Mercurial > hg > soundsoftware-site
comparison test/functional/.svn/text-base/welcome_controller_test.rb.svn-base @ 245:051f544170fe
* Update to SVN trunk revision 4993
author | Chris Cannam |
---|---|
date | Thu, 03 Mar 2011 11:42:28 +0000 |
parents | 8661b858af72 |
children |
comparison
equal
deleted
inserted
replaced
244:8972b600f4fb | 245:051f544170fe |
---|---|
65 get :robots | 65 get :robots |
66 assert_response :success | 66 assert_response :success |
67 assert_equal 'text/plain', @response.content_type | 67 assert_equal 'text/plain', @response.content_type |
68 assert @response.body.match(%r{^Disallow: /projects/ecookbook/issues\r?$}) | 68 assert @response.body.match(%r{^Disallow: /projects/ecookbook/issues\r?$}) |
69 end | 69 end |
70 | |
71 def test_warn_on_leaving_unsaved_turn_on | |
72 user = User.find(2) | |
73 user.pref.warn_on_leaving_unsaved = '1' | |
74 user.pref.save! | |
75 @request.session[:user_id] = 2 | |
76 | |
77 get :index | |
78 assert_tag 'script', | |
79 :attributes => {:type => "text/javascript"}, | |
80 :content => %r{new WarnLeavingUnsaved} | |
81 end | |
82 | |
83 def test_warn_on_leaving_unsaved_turn_off | |
84 user = User.find(2) | |
85 user.pref.warn_on_leaving_unsaved = '0' | |
86 user.pref.save! | |
87 @request.session[:user_id] = 2 | |
88 | |
89 get :index | |
90 assert_no_tag 'script', | |
91 :attributes => {:type => "text/javascript"}, | |
92 :content => %r{new WarnLeavingUnsaved} | |
93 end | |
70 end | 94 end |