-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from ikraamg/bump-required-ruby-version
Bump required ruby version and align controller behaviour
- Loading branch information
Showing
28 changed files
with
98 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module SolidusAfterpay | ||
VERSION = '0.2.0' | ||
VERSION = '0.3.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
require 'spec_helper' | ||
|
||
RSpec.describe Spree::Order, type: :model do | ||
RSpec.describe Spree::Order do | ||
let(:store) { create(:store) } | ||
let(:user) { create(:user, email: "[email protected]") } | ||
let(:order) { create(:order, user: user, store: store) } | ||
|
@@ -55,12 +55,12 @@ | |
subject { order.available_payment_methods } | ||
|
||
let!(:first_method) { | ||
FactoryBot.create(:payment_method, available_to_users: true, | ||
available_to_admin: true) | ||
create(:payment_method, available_to_users: true, | ||
available_to_admin: true) | ||
} | ||
let!(:second_method) { | ||
FactoryBot.create(:payment_method, available_to_users: true, | ||
available_to_admin: true) | ||
create(:payment_method, available_to_users: true, | ||
available_to_admin: true) | ||
} | ||
|
||
before do | ||
|
@@ -120,9 +120,7 @@ | |
before { order.update!(store: store_with_payment_methods) } | ||
|
||
it 'returns only the matching payment methods for that store' do | ||
expect(order.available_payment_methods).to match_array( | ||
[payment_method_with_store] | ||
) | ||
expect(order.available_payment_methods).to contain_exactly(payment_method_with_store) | ||
end | ||
|
||
context 'when the store has an extra payment method unavailable to users' do | ||
|
@@ -137,9 +135,7 @@ | |
end | ||
|
||
it 'returns only the payment methods available to users for that store' do | ||
expect(order.available_payment_methods).to match_array( | ||
[payment_method_with_store] | ||
) | ||
expect(order.available_payment_methods).to contain_exactly(payment_method_with_store) | ||
end | ||
end | ||
end | ||
|
@@ -148,9 +144,8 @@ | |
before { order.update!(store: store_without_payment_methods) } | ||
|
||
it 'returns all matching payment methods regardless of store' do | ||
expect(order.available_payment_methods).to match_array( | ||
[payment_method_with_store, payment_method_without_store] | ||
) | ||
expect(order.available_payment_methods).to contain_exactly(payment_method_with_store, | ||
payment_method_without_store) | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.