Fix line lenght issues on spec files

This commit is contained in:
Bertocq
2018-02-15 23:21:03 +01:00
parent 4e34a1cf41
commit 44aeb7528d
3 changed files with 11 additions and 7 deletions

View File

@@ -56,13 +56,14 @@ shared_examples "followable" do |followable_class_name, followable_path, followa
scenario "Should display new follower notice after user clicks on follow button", :js do
user = create(:user)
login_as(user)
create_notice_message = t("shared.followable.#{followable_class_name}.create.notice_html")
visit send(followable_path, arguments)
within "##{dom_id(followable)}" do
click_link("Follow #{followable.model_name.human.downcase}")
end
expect(page).to have_content strip_tags(t("shared.followable.#{followable_class_name}.create.notice_html"))
expect(page).to have_content strip_tags(notice_html_message)
end
scenario "Display unfollow button when user already following" do
@@ -75,7 +76,7 @@ shared_examples "followable" do |followable_class_name, followable_path, followa
expect(page).to have_link("Following")
end
scenario "Should update follow button and show destroy notice after user clicks on unfollow button", :js do
scenario "Updates follow button & show destroy notice after unfollow button is clicked", :js do
user = create(:user)
follow = create(:follow, user: user, followable: followable)
login_as(user)
@@ -93,13 +94,14 @@ shared_examples "followable" do |followable_class_name, followable_path, followa
user = create(:user)
follow = create(:follow, user: user, followable: followable)
login_as(user)
destroy_notice_message = t("shared.followable.#{followable_class_name}.destroy.notice_html")
visit send(followable_path, arguments)
within "##{dom_id(followable)}" do
click_link("Unfollow #{followable.model_name.human.downcase}")
end
expect(page).to have_content strip_tags(t("shared.followable.#{followable_class_name}.destroy.notice_html"))
expect(page).to have_content strip_tags(destroy_notice_message)
end
end