- <%= link_to t("related_content.score_positive"),
- score_positive_related_content_path(related),
- method: :put,
- remote: true,
- class: "score-positive" %>
+
+ <%= button_to t("related_content.score_positive"),
+ score_positive_related_content_path(related),
+ method: :put,
+ remote: true,
+ class: "score-positive" %>
- <%= link_to t("related_content.score_negative"),
- score_negative_related_content_path(related),
- method: :put,
- remote: true,
- class: "score-negative" %>
-
+ <%= button_to t("related_content.score_negative"),
+ score_negative_related_content_path(related),
+ method: :put,
+ remote: true,
+ class: "score-negative" %>
+
diff --git a/spec/shared/system/relationable.rb b/spec/shared/system/relationable.rb
index 32e657b9d..4e1c0cce3 100644
--- a/spec/shared/system/relationable.rb
+++ b/spec/shared/system/relationable.rb
@@ -146,10 +146,10 @@ shared_examples "relationable" do |relationable_model_name|
visit polymorphic_path(relationable)
within("#related-content-list") do
- click_link "Yes"
+ click_button "Yes"
- expect(page).not_to have_link "Yes"
- expect(page).not_to have_link "No"
+ expect(page).not_to have_button "Yes"
+ expect(page).not_to have_button "No"
end
end
@@ -163,10 +163,10 @@ shared_examples "relationable" do |relationable_model_name|
visit polymorphic_path(relationable)
within("#related-content-list") do
- click_link "No"
+ click_button "No"
- expect(page).not_to have_link "Yes"
- expect(page).not_to have_link "No"
+ expect(page).not_to have_button "Yes"
+ expect(page).not_to have_button "No"
end
end