]> source.dussan.org Git - redmine.git/commitdiff
No need to use custom host name in these tests.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Mar 2016 09:58:06 +0000 (09:58 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Mar 2016 09:58:06 +0000 (09:58 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15285 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/account_controller_test.rb
test/functional/issues_controller_test.rb

index c3f7d6812be06a291874c238fa1e8e006af41d8f..ad187b293e93de9a4ab4b10d696e289055612503 100644 (file)
@@ -326,10 +326,8 @@ class AccountControllerTest < ActionController::TestCase
     ActionMailer::Base.deliveries.clear
     assert_difference 'ActionMailer::Base.deliveries.size' do
       assert_difference 'Token.count' do
-        with_settings :host_name => 'mydomain.foo', :protocol => 'http' do
-          post :lost_password, :mail => 'JSmith@somenet.foo'
-          assert_redirected_to '/login'
-        end
+        post :lost_password, :mail => 'JSmith@somenet.foo'
+        assert_redirected_to '/login'
       end
     end
 
@@ -338,7 +336,7 @@ class AccountControllerTest < ActionController::TestCase
     assert_equal 'recovery', token.action
 
     assert_select_email do
-      assert_select "a[href=?]", "http://mydomain.foo/account/lost_password?token=#{token.value}"
+      assert_select "a[href=?]", "http://localhost:3000/account/lost_password?token=#{token.value}"
     end
   end
 
index 7679195bb5ec72658fa4fe9cf4fa59b3052d7747..2dd0f4618b466f3471e742d1101d1bc0301ff18f 100644 (file)
@@ -2587,7 +2587,7 @@ class IssuesControllerTest < ActionController::TestCase
     set_tmp_attachments_directory
     @request.session[:user_id] = 2
 
-    with_settings :host_name => 'mydomain.foo', :protocol => 'http', :notified_events => %w(issue_added) do
+    with_settings :notified_events => %w(issue_added) do
       assert_difference 'Issue.count' do
         post :create, :project_id => 1,
           :issue => { :tracker_id => '1', :subject => 'With attachment' },
@@ -2597,7 +2597,7 @@ class IssuesControllerTest < ActionController::TestCase
 
     assert_not_nil ActionMailer::Base.deliveries.last
     assert_select_email do
-      assert_select 'a[href^=?]', 'http://mydomain.foo/attachments/download', 'testfile.txt'
+      assert_select 'a[href^=?]', 'http://localhost:3000/attachments/download', 'testfile.txt'
     end
   end