Update relationship controller tests for blocking-related actions
This commit is contained in:
parent
7b17a93075
commit
9b5fefc661
|
@ -17,6 +17,7 @@ en:
|
||||||
answering_other_blocked_self: "You cannot answer this question as you have been blocked its author"
|
answering_other_blocked_self: "You cannot answer this question as you have been blocked its author"
|
||||||
self_action: "You cannot do this to yourself"
|
self_action: "You cannot do this to yourself"
|
||||||
following_self: "You cannot follow yourself"
|
following_self: "You cannot follow yourself"
|
||||||
|
blocking_self: "You cannot block yourself"
|
||||||
|
|
||||||
not_found: "That does not exist"
|
not_found: "That does not exist"
|
||||||
user_not_found: "User not found"
|
user_not_found: "User not found"
|
||||||
|
|
|
@ -56,6 +56,12 @@ describe Ajax::RelationshipController, type: :controller do
|
||||||
include_examples "valid relationship type"
|
include_examples "valid relationship type"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "type = 'block'" do
|
||||||
|
let(:type) { "block" }
|
||||||
|
|
||||||
|
include_examples "valid relationship type"
|
||||||
|
end
|
||||||
|
|
||||||
context "type = 'dick'" do
|
context "type = 'dick'" do
|
||||||
let(:type) { "dick" }
|
let(:type) { "dick" }
|
||||||
|
|
||||||
|
@ -109,6 +115,12 @@ describe Ajax::RelationshipController, type: :controller do
|
||||||
include_examples "valid relationship type"
|
include_examples "valid relationship type"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "type = 'block'" do
|
||||||
|
let(:type) { "block" }
|
||||||
|
|
||||||
|
include_examples "valid relationship type"
|
||||||
|
end
|
||||||
|
|
||||||
context "type = 'dick'" do
|
context "type = 'dick'" do
|
||||||
let(:type) { "dick" }
|
let(:type) { "dick" }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue