You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
717 B
25 lines
717 B
require "rails_helper" |
|
|
|
RSpec.describe OrganisationRelationship do |
|
let(:parent_organisation) { create(:organisation) } |
|
let(:child_organisation) { create(:organisation) } |
|
|
|
context "when a relationship exists" do |
|
subject!(:relationship) do |
|
described_class.create!(parent_organisation:, |
|
child_organisation:) |
|
end |
|
|
|
describe "parent#managing_agents" do |
|
it "includes child" do |
|
expect(parent_organisation.managing_agents).to include(child_organisation) |
|
end |
|
end |
|
|
|
describe "child#housing_providers" do |
|
it "includes parent" do |
|
expect(child_organisation.housing_providers).to include(parent_organisation) |
|
end |
|
end |
|
end |
|
end
|
|
|