summaryrefslogtreecommitdiffstats
path: root/test/functional/watchers_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/watchers_controller_test.rb')
-rw-r--r--test/functional/watchers_controller_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/watchers_controller_test.rb b/test/functional/watchers_controller_test.rb
index 9247b6631..e477af5e8 100644
--- a/test/functional/watchers_controller_test.rb
+++ b/test/functional/watchers_controller_test.rb
@@ -84,10 +84,19 @@ class WatchersControllerTest < ActionController::TestCase
assert_select_rjs :replace_html, 'ajax-modal'
end
- def test_new_for_new_record
+ def test_new_for_new_record_with_id
@request.session[:user_id] = 2
xhr :get, :new, :project_id => 1
assert_response :success
+ assert_equal Project.find(1), assigns(:project)
+ assert_select_rjs :replace_html, 'ajax-modal'
+ end
+
+ def test_new_for_new_record_with_identifier
+ @request.session[:user_id] = 2
+ xhr :get, :new, :project_id => 'ecookbook'
+ assert_response :success
+ assert_equal Project.find(1), assigns(:project)
assert_select_rjs :replace_html, 'ajax-modal'
end