Test that anonymous note encouragement disappears after login
This commit is contained in:
parent
f745cae93b
commit
fe214adbc6
1 changed files with 15 additions and 1 deletions
|
@ -79,7 +79,7 @@ class CreateNoteTest < ApplicationSystemTestCase
|
|||
end
|
||||
end
|
||||
|
||||
test "encouragement to contribute appears after 10 created notes" do
|
||||
test "encouragement to contribute appears after 10 created notes and disappears after login" do
|
||||
encouragement_threshold = 10
|
||||
|
||||
encouragement_threshold.times do |n|
|
||||
|
@ -100,5 +100,19 @@ class CreateNoteTest < ApplicationSystemTestCase
|
|||
within_sidebar do
|
||||
assert_content(/already posted at least #{encouragement_threshold} anonymous note/)
|
||||
end
|
||||
|
||||
sign_in_as(create(:user))
|
||||
visit new_note_path(:anchor => "map=16/0/#{0.001 * encouragement_threshold}")
|
||||
|
||||
within_sidebar do
|
||||
assert_no_content(/already posted at least \d+ anonymous note/)
|
||||
end
|
||||
|
||||
sign_out
|
||||
visit new_note_path(:anchor => "map=16/0/#{0.001 * encouragement_threshold}")
|
||||
|
||||
within_sidebar do
|
||||
assert_no_content(/already posted at least \d+ anonymous note/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue