Skip to content

Commit

Permalink
test: additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed May 12, 2020
1 parent bd31057 commit 2087ae5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/models/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@
end
end

context "to consortium_organization" do
let(:new_provider) { create(:provider, symbol: "QUECHUA", member_type: "consortium_organization") }
let(:options) { { target_id: new_provider.symbol } }

it "works" do
client.transfer(options)

expect(client.provider_id).to eq(new_provider.symbol.downcase)
expect(new_provider.prefixes.length).to eq(1)
expect(provider.prefixes.length).to eq(1)

expect(new_provider.prefix_ids).to include(prefix.uid)
expect(provider.prefix_ids).not_to include(prefix.uid)
end
end

context "to consortium" do
let(:new_provider) { create(:provider, symbol: "QUECHUA", role_name: "ROLE_CONSORTIUM") }
let(:options) { { target_id: new_provider.symbol } }
Expand Down

0 comments on commit 2087ae5

Please sign in to comment.