Browse Source

Update test names

pull/1729/head
Kat 3 years ago
parent
commit
a62f3775d3
  1. 12
      spec/requests/organisation_relationships_controller_spec.rb

12
spec/requests/organisation_relationships_controller_spec.rb

@ -299,7 +299,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
context "when directly accessing the page to add a stock owner" do context "when directly accessing the page to add a stock owner" do
let(:request) { get "/organisations/#{organisation.id}/stock-owners/add", headers: } let(:request) { get "/organisations/#{organisation.id}/stock-owners/add", headers: }
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end
@ -316,7 +316,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end end
let(:request) { post "/organisations/#{organisation.id}/stock-owners", headers:, params: } let(:request) { post "/organisations/#{organisation.id}/stock-owners", headers:, params: }
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end
@ -334,7 +334,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
FactoryBot.create(:organisation_relationship, parent_organisation: stock_owner, child_organisation: organisation) FactoryBot.create(:organisation_relationship, parent_organisation: stock_owner, child_organisation: organisation)
end end
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end
@ -343,7 +343,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
context "when directly accessing the page to add a managing agent" do context "when directly accessing the page to add a managing agent" do
let(:request) { get "/organisations/#{organisation.id}/managing-agents/add", headers: } let(:request) { get "/organisations/#{organisation.id}/managing-agents/add", headers: }
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end
@ -360,7 +360,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end end
let(:request) { post "/organisations/#{organisation.id}/managing-agents", headers:, params: } let(:request) { post "/organisations/#{organisation.id}/managing-agents", headers:, params: }
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end
@ -378,7 +378,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
FactoryBot.create(:organisation_relationship, parent_organisation: organisation, child_organisation: managing_agent) FactoryBot.create(:organisation_relationship, parent_organisation: organisation, child_organisation: managing_agent)
end end
it "returns 401 from users page" do it "returns 401" do
request request
expect(response).to have_http_status(:unauthorized) expect(response).to have_http_status(:unauthorized)
end end

Loading…
Cancel
Save