diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-29 16:44:47 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-29 16:44:47 +0100 |
commit | 75fb68c4d1eb647a268890c080da2dc3875c0e77 (patch) | |
tree | c3e20c251a4d065475e8f6d685a14b669a09bbe4 /test/unit/callthrough_test.rb | |
parent | a9be92fdc62d55e6b6a8da80f0fe959ad90fa678 (diff) |
Get rid of @current_user. The use of current_user is better.
Diffstat (limited to 'test/unit/callthrough_test.rb')
-rw-r--r-- | test/unit/callthrough_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/callthrough_test.rb b/test/unit/callthrough_test.rb index 5764c0d..2e8cc56 100644 --- a/test/unit/callthrough_test.rb +++ b/test/unit/callthrough_test.rb @@ -12,7 +12,7 @@ class CallthroughTest < ActiveSupport::TestCase @gemeinschaft_setup.country = Country.first @gemeinschaft_setup.language = Language.first - @current_user = @gemeinschaft_setup.build_user( + current_user = @gemeinschaft_setup.build_user( :user_name => I18n.t('gemeinschaft_setups.initial_setup.admin_name'), :male => true, :email => 'admin@localhost', @@ -52,18 +52,18 @@ class CallthroughTest < ActiveSupport::TestCase @tenant.did_list = '02622-70648-x, 02622-706480' @tenant.save - @tenant.tenant_memberships.create(:user_id => @current_user.id) - @current_user.update_attributes!(:current_tenant_id => @tenant.id) + @tenant.tenant_memberships.create(:user_id => current_user.id) + current_user.update_attributes!(:current_tenant_id => @tenant.id) # The first user becomes a member of the 'admin' UserGroup # admin_group = @tenant.user_groups.create(:name => I18n.t('gemeinschaft_setups.initial_setup.admin_group_name')) - admin_group.users << @current_user + admin_group.users << current_user # User group # user_group = @tenant.user_groups.create(:name => I18n.t('gemeinschaft_setups.initial_setup.user_group_name')) - user_group.users << @current_user + user_group.users << current_user # Generate the internal_extensions # @@ -84,7 +84,7 @@ class CallthroughTest < ActiveSupport::TestCase # assert @gemeinschaft_setup.valid? assert @sip_domain.valid? - assert @current_user.valid? + assert current_user.valid? assert @tenant.valid? |