]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/diary_entry_controller_test.rb
Get all the tests passing under ruby 1.9
[rails.git] / test / functional / diary_entry_controller_test.rb
index 7981edd958a15b82222b869ca45f08c1a4835d0b..0fa9ea97f276c9810dc41d262e78f750de203e26 100644 (file)
@@ -104,7 +104,7 @@ class DiaryEntryControllerTest < ActionController::TestCase
       end
       assert_select "body", :count => 1 do
         assert_select "div#content", :count => 1 do
-          assert_select "h1", "New Diary Entry", :count => 1
+          assert_select "h1", :text => "New Diary Entry", :count => 1
           # We don't care about the layout, we just care about the form fields
           # that are available
           assert_select "form[action='/diary/new']", :count => 1 do
@@ -159,7 +159,9 @@ class DiaryEntryControllerTest < ActionController::TestCase
             assert_select "input#latitude[name='diary_entry[latitude]']", :count => 1
             assert_select "input#longitude[name='diary_entry[longitude]']", :count => 1
             assert_select "input[name=commit][type=submit][value=Save]", :count => 1
-            assert_select "input", :count => 5
+            assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
+            assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
+            assert_select "input", :count => 7
           end
         end
       end