forked from Shopify/shopify-api-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into enable-cla-bot
- Loading branch information
Showing
8 changed files
with
70 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
module ShopifyAPI | ||
class Currency < Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module ShopifyAPI | ||
VERSION = "5.1.0" | ||
VERSION = "5.2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
# frozen_string_literal: true | ||
require 'test_helper' | ||
class CurrencyTest < Test::Unit::TestCase | ||
def setup | ||
super | ||
fake "currencies", method: :get, body: load_fixture('currencies') | ||
end | ||
|
||
context "Currency" do | ||
should 'return a list of enabled currencies' do | ||
currencies = ShopifyAPI::Currency.all | ||
assert_equal 4, currencies.count | ||
assert_equal %w(AUD EUR GBP HKD), currencies.map(&:currency) | ||
assert_equal [true, true, true, false], currencies.map(&:enabled) | ||
currencies.each do |currency| | ||
assert_equal "2018-10-03T14:44:08-04:00", currency.rate_updated_at | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"currencies": [ | ||
{ | ||
"currency": "AUD", | ||
"rate_updated_at": "2018-10-03T14:44:08-04:00", | ||
"enabled": true | ||
}, | ||
{ | ||
"currency": "EUR", | ||
"rate_updated_at": "2018-10-03T14:44:08-04:00", | ||
"enabled": true | ||
}, | ||
{ | ||
"currency": "GBP", | ||
"rate_updated_at": "2018-10-03T14:44:08-04:00", | ||
"enabled": true | ||
}, | ||
{ | ||
"currency": "HKD", | ||
"rate_updated_at": "2018-10-03T14:44:08-04:00", | ||
"enabled": false | ||
} | ||
] | ||
} | ||
|