diff options
Diffstat (limited to 'spec/support/services/issuable_import_csv_service_shared_examples.rb')
-rw-r--r-- | spec/support/services/issuable_import_csv_service_shared_examples.rb | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/spec/support/services/issuable_import_csv_service_shared_examples.rb b/spec/support/services/issuable_import_csv_service_shared_examples.rb index f68750bec32..07118198969 100644 --- a/spec/support/services/issuable_import_csv_service_shared_examples.rb +++ b/spec/support/services/issuable_import_csv_service_shared_examples.rb @@ -67,10 +67,7 @@ RSpec.shared_examples 'issuable import csv service' do |issuable_type| it 'correctly sets the issuable attributes' do expect { subject }.to change { issuables.count }.by 4 - expect(issuables.reload.last).to have_attributes( - title: 'Test Title', - description: 'Test Description' - ) + expect(issuables.reload).to include(have_attributes({ title: 'Test Title', description: 'Test Description' })) end it_behaves_like 'importer with email notification' @@ -89,10 +86,7 @@ RSpec.shared_examples 'issuable import csv service' do |issuable_type| it 'correctly sets the issuable attributes' do expect { subject }.to change { issuables.count }.by 3 - expect(issuables.reload.last).to have_attributes( - title: 'Title with quote"', - description: 'Description' - ) + expect(issuables.reload).to include(have_attributes(title: 'Title with quote"', description: 'Description')) end it_behaves_like 'importer with email notification' @@ -111,10 +105,7 @@ RSpec.shared_examples 'issuable import csv service' do |issuable_type| it 'correctly sets the issuable attributes' do expect { subject }.to change { issuables.count }.by 2 - expect(issuables.reload.last).to have_attributes( - title: 'Hello', - description: 'World' - ) + expect(issuables.reload).to include(have_attributes(title: 'Hello', description: 'World')) end it_behaves_like 'importer with email notification' @@ -133,10 +124,7 @@ RSpec.shared_examples 'issuable import csv service' do |issuable_type| it 'correctly sets the issuable attributes' do expect { subject }.to change { issuables.count }.by 3 - expect(issuables.reload.last).to have_attributes( - title: 'Hello', - description: 'World' - ) + expect(issuables.reload).to include(have_attributes(title: 'Hello', description: 'World')) end it_behaves_like 'importer with email notification' |