projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b617b7
)
Check that the flag is not show when not logged in
author
Andy Allan
<git@gravitystorm.co.uk>
Wed, 6 Sep 2017 10:31:21 +0000
(11:31 +0100)
committer
Andy Allan
<git@gravitystorm.co.uk>
Wed, 6 Sep 2017 10:31:21 +0000
(11:31 +0100)
test/features/report_diary_entry_test.rb
patch
|
blob
|
history
diff --git
a/test/features/report_diary_entry_test.rb
b/test/features/report_diary_entry_test.rb
index aaa89ad5b8c30a15d0f79b66f2bad321b86243ab..820b5f77ba1d17b57f9b2c35d06165403a964c86 100644
(file)
--- a/
test/features/report_diary_entry_test.rb
+++ b/
test/features/report_diary_entry_test.rb
@@
-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)