Browse Source

rubocop

pull/671/head
JG 3 years ago
parent
commit
cdb1101cf5
  1. 2
      app/controllers/schemes_controller.rb
  2. 10
      spec/models/organisation_spec.rb

2
app/controllers/schemes_controller.rb

@ -88,7 +88,7 @@ class SchemesController < ApplicationController
private private
def confirm_secondary_page? page def confirm_secondary_page?(page)
page == "confirm-secondary" && @scheme.has_other_client_group == "Yes" page == "confirm-secondary" && @scheme.has_other_client_group == "Yes"
end end

10
spec/models/organisation_spec.rb

@ -4,7 +4,7 @@ RSpec.describe Organisation, type: :model do
describe "#new" do describe "#new" do
let(:user) { FactoryBot.create(:user) } let(:user) { FactoryBot.create(:user) }
let!(:organisation) { user.organisation } let!(:organisation) { user.organisation }
let!(:scheme) { FactoryBot.create(:scheme, organisation: organisation, stock_owning_organisation: organisation) } let!(:scheme) { FactoryBot.create(:scheme, organisation:, stock_owning_organisation: organisation) }
it "has expected fields" do it "has expected fields" do
expect(organisation.attribute_names).to include("name", "phone", "provider_type") expect(organisation.attribute_names).to include("name", "phone", "provider_type")
@ -14,15 +14,11 @@ RSpec.describe Organisation, type: :model do
expect(organisation.users.first).to eq(user) expect(organisation.users.first).to eq(user)
end end
it "has schemes" do it "has managed_schemes" do
expect(organisation.managed_schemes.first).to eq(scheme) expect(organisation.managed_schemes.first).to eq(scheme)
end end
it "has schemes" do it "has owned_schemes" do
expect(organisation.managed_schemes.first).to eq(scheme)
end
it "has schemes" do
expect(organisation.owned_schemes.first).to eq(scheme) expect(organisation.owned_schemes.first).to eq(scheme)
end end

Loading…
Cancel
Save