Sha256: 4480ae375953e7db39d007d3aca3d8397fbcd391f5c4ba0f51cdd6ea0ca6f63a
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' describe CreateDossierGroup do let(:session) { Fabricate :oauth_session } it 'performs a post on the /dossier_groups api path' do expect(session).to receive(:post).with '/dossier_groups', dossier_group: {some: 'attributes'}, organization_id: 'some_organization_id' CreateDossierGroup.run!(session: session, attributes: {some: 'attributes'}, organization_id: 'some_organization_id') end it 'returns a Dossier model' do allow(session).to receive(:post).with('/dossier_groups', dossier_group: {some: 'attributes'}, organization_id: 'some_organization_id') .and_return 'id' => 'some_id', 'name' => 'some_name' dossier_group = CreateDossierGroup.run!(session: session, attributes: {some: 'attributes'}, organization_id: 'some_organization_id') expect(dossier_group).to be_a(DossierGroup) expect(dossier_group.id).to eq('some_id') expect(dossier_group.name).to eq('some_name') end end
Version data entries
16 entries across 16 versions & 1 rubygems