diff --git a/config/locales/errors.en.yml b/config/locales/errors.en.yml index c5e2dfb3..7f9aed2f 100644 --- a/config/locales/errors.en.yml +++ b/config/locales/errors.en.yml @@ -17,6 +17,7 @@ en: answering_other_blocked_self: "You cannot answer this question as you have been blocked its author" self_action: "You cannot do this to yourself" following_self: "You cannot follow yourself" + blocking_self: "You cannot block yourself" not_found: "That does not exist" user_not_found: "User not found" diff --git a/spec/controllers/ajax/relationship_controller_spec.rb b/spec/controllers/ajax/relationship_controller_spec.rb index 40a3c9d9..40be8626 100644 --- a/spec/controllers/ajax/relationship_controller_spec.rb +++ b/spec/controllers/ajax/relationship_controller_spec.rb @@ -56,6 +56,12 @@ describe Ajax::RelationshipController, type: :controller do include_examples "valid relationship type" end + context "type = 'block'" do + let(:type) { "block" } + + include_examples "valid relationship type" + end + context "type = 'dick'" do let(:type) { "dick" } @@ -109,6 +115,12 @@ describe Ajax::RelationshipController, type: :controller do include_examples "valid relationship type" end + context "type = 'block'" do + let(:type) { "block" } + + include_examples "valid relationship type" + end + context "type = 'dick'" do let(:type) { "dick" }