]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Use bootstrap table striping to replace hand-cycled table stripes
[rails.git] / test / controllers / diary_entries_controller_test.rb
index fd03758233c5699421b8025f8812fb493583a1f0..0f071914e08190418a1a7180aec6ce677f9af3ff 100644 (file)
@@ -4,6 +4,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
   include ActionView::Helpers::NumberHelper
 
   def setup
+    super
     # Create the default language for diary entries
     create(:language, :code => "en")
     # Stub nominatim response for diary entry locations
@@ -528,8 +529,8 @@ class DiaryEntriesControllerTest < ActionController::TestCase
   def test_index_friends
     user = create(:user)
     other_user = create(:user)
-    friend = create(:friend, :befriender => user)
-    diary_entry = create(:diary_entry, :user => friend.befriendee)
+    friendship = create(:friendship, :befriender => user)
+    diary_entry = create(:diary_entry, :user => friendship.befriendee)
     _other_entry = create(:diary_entry, :user => other_user)
 
     # Try a list of diary entries for your friends when not logged in
@@ -872,7 +873,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     get :comments, :params => { :display_name => user.display_name }
     assert_response :success
     assert_template :comments
-    assert_select "table.messages" do
+    assert_select "table.table-striped" do
       assert_select "tr", :count => 1 # header, no comments
     end
 
@@ -882,7 +883,7 @@ class DiaryEntriesControllerTest < ActionController::TestCase
     get :comments, :params => { :display_name => other_user.display_name }
     assert_response :success
     assert_template :comments
-    assert_select "table.messages" do
+    assert_select "table.table-striped" do
       assert_select "tr", :count => 2 # header and one comment
     end