diff options
Diffstat (limited to 'spec/services/jira_connect/sync_service_spec.rb')
-rw-r--r-- | spec/services/jira_connect/sync_service_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/services/jira_connect/sync_service_spec.rb b/spec/services/jira_connect/sync_service_spec.rb index 32580a7735f..7457cdca13c 100644 --- a/spec/services/jira_connect/sync_service_spec.rb +++ b/spec/services/jira_connect/sync_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JiraConnect::SyncService do +RSpec.describe JiraConnect::SyncService, feature_category: :integrations do include AfterNextHelpers describe '#execute' do @@ -44,16 +44,18 @@ RSpec.describe JiraConnect::SyncService do subject end - context 'when a request returns an error' do - it 'logs the response as an error' do + context 'when a request returns errors' do + it 'logs each response as an error' do expect_next(client).to store_info( [ { 'errorMessages' => ['some error message'] }, - { 'errorMessages' => ['x'] } + { 'errorMessage' => 'a single error message' }, + { 'errorMessages' => [] }, + { 'errorMessage' => '' } ]) expect_log(:error, { 'errorMessages' => ['some error message'] }) - expect_log(:error, { 'errorMessages' => ['x'] }) + expect_log(:error, { 'errorMessage' => 'a single error message' }) subject end |