diff --git a/test/integration/otrs_import_test.rb b/test/integration/otrs_import_test.rb index 838bce906..cc2353377 100644 --- a/test/integration/otrs_import_test.rb +++ b/test/integration/otrs_import_test.rb @@ -3,6 +3,11 @@ require 'integration_test_helper' class OtrsImportTest < ActiveSupport::TestCase + Setting.set("import_otrs_endpoint", "http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator") + Setting.set("import_otrs_endpoint_key", "01234567899876543210") + Setting.set("import_mode", true) + Import::OTRS2.start + # check settings items test 'check settings' do assert_equal( '305', Setting.get('system_id'), 'system_id' ) diff --git a/test/unit/twitter_test.rb b/test/integration/twitter_test.rb similarity index 98% rename from test/unit/twitter_test.rb rename to test/integration/twitter_test.rb index 526860d2f..8c02e5a76 100644 --- a/test/unit/twitter_test.rb +++ b/test/integration/twitter_test.rb @@ -1,8 +1,11 @@ # encoding: utf-8 -require 'test_helper' +require 'integration_test_helper' class TwitterTest < ActiveSupport::TestCase + # set system mode to done / to activate + Setting.set('system_init_done', true) + # needed to check correct behavior Group.create_if_not_exists( :id => 2, diff --git a/test/integration_test_helper.rb b/test/integration_test_helper.rb index 04cffc9bc..5fa3810e1 100644 --- a/test/integration_test_helper.rb +++ b/test/integration_test_helper.rb @@ -13,16 +13,11 @@ class ActiveSupport::TestCase # load seeds load "#{Rails.root}/db/seeds.rb" - Setting.set("import_otrs_endpoint", "http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator") - Setting.set("import_otrs_endpoint_key", "01234567899876543210") - Setting.set("import_mode", true) - Import::OTRS2.start - setup do # set current user - #puts 'reset UserInfo.current_user_id' - #UserInfo.current_user_id = nil + puts 'reset UserInfo.current_user_id' + UserInfo.current_user_id = nil end # Add more helper methods to be used by all tests here...