diff options
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/backup_job_test.rb | 7 | ||||
-rw-r--r-- | test/unit/callthrough_test.rb | 12 | ||||
-rw-r--r-- | test/unit/intruder_test.rb | 7 | ||||
-rw-r--r-- | test/unit/system_message_test.rb | 7 |
4 files changed, 20 insertions, 13 deletions
diff --git a/test/unit/backup_job_test.rb b/test/unit/backup_job_test.rb new file mode 100644 index 0000000..a63c219 --- /dev/null +++ b/test/unit/backup_job_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class BackupJobTest < ActiveSupport::TestCase + def test_should_be_valid + assert BackupJob.new.valid? + end +end 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? diff --git a/test/unit/intruder_test.rb b/test/unit/intruder_test.rb new file mode 100644 index 0000000..f1b7963 --- /dev/null +++ b/test/unit/intruder_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class IntruderTest < ActiveSupport::TestCase + def test_should_be_valid + assert Intruder.new.valid? + end +end diff --git a/test/unit/system_message_test.rb b/test/unit/system_message_test.rb deleted file mode 100644 index 0476ac8..0000000 --- a/test/unit/system_message_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class SystemMessageTest < ActiveSupport::TestCase - # def test_should_be_valid - # assert SystemMessage.new.valid? - # end -end |