]> git.openstreetmap.org Git - rails.git/commitdiff
Check that the flag is not show when not logged in
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Sep 2017 10:31:21 +0000 (11:31 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Sep 2017 10:31:21 +0000 (11:31 +0100)
test/features/report_diary_entry_test.rb

index aaa89ad5b8c30a15d0f79b66f2bad321b86243ab..820b5f77ba1d17b57f9b2c35d06165403a964c86 100644 (file)
@@ -6,6 +6,13 @@ class ReportDiaryEntryTest < Capybara::Rails::TestCase
     @diary_entry = create(:diary_entry)
   end
 
+  def test_no_flag_when_not_logged_in
+    visit diary_entry_path(@diary_entry.user.display_name, @diary_entry)
+    assert page.has_content?(@diary_entry.title)
+
+    assert !page.has_content?("\u2690")
+  end
+
   def test_it_works
     sign_in_as(create(:user))
     visit diary_entry_path(@diary_entry.user.display_name, @diary_entry)