Skip to content

Commit

Permalink
[TEC-4931] Small styling fixes to raise_error expectations in OrderSy…
Browse files Browse the repository at this point in the history
…nc and OrderUpdater specs
  • Loading branch information
texpert authored and sebastiandl committed Mar 31, 2021
1 parent 407e060 commit de57edb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions spec/services/flowcommerce_spree/order_updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
require 'rails_helper'

RSpec.describe FlowcommerceSpree::OrderUpdater do
subject { FlowcommerceSpree::OrderUpdater }

let(:zone) { create(:germany_zone, :with_flow_data) }
let(:order) { create(:order_with_line_items, :with_flow_data) }

context 'when order is not present' do
subject { FlowcommerceSpree::OrderUpdater.new(order: nil) }

it 'raises exception' do
expect { subject }.to(raise_error.with_message('Experience not defined or not active'))
expect { subject.new(order: nil) }.to raise_error(ArgumentError, 'Experience not defined or not active')
end
end

context 'when the order has no flow experience' do
let(:order) { create(:order) }

subject { FlowcommerceSpree::OrderUpdater.new(order: order) }

it 'raises exception' do
expect { subject }.to(raise_error.with_message('Experience not defined or not active'))
expect { subject.new(order: order) }.to raise_error(ArgumentError, 'Experience not defined or not active')
end
end
end

0 comments on commit de57edb

Please sign in to comment.