Skip to content

Commit

Permalink
fix(tests): updated
Browse files Browse the repository at this point in the history
  • Loading branch information
matt.evans committed Aug 29, 2021
1 parent c61f7a2 commit 5168080
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dinero.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
packageVersion = "0.7.0"
packageVersion = "0.7.1"
backendURL = "https://openexchangerates.org"
userAgent = "dinero/" + packageVersion
)
Expand Down
5 changes: 4 additions & 1 deletion rates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ func TestListHistoricalRates(t *testing.T) {
// Init dinero client.
client := NewClient(appID, "USD", 1*time.Minute)

historicalDateStr := "2012-07-10"
historicalDateTime, _ := time.Parse("2006-01-02", historicalDateStr)

// Get yesterdays forex rates.
response, err := client.Rates.ListHistorical(time.Now().AddDate(0,0,1))
response, err := client.Rates.ListHistorical(historicalDateTime)
if err != nil {
if strings.HasPrefix(err.Error(), setBaseNotAllowedResponsePrefix) {
t.Skipf("skipping test, unsuitable app ID: %s", err)
Expand Down

0 comments on commit 5168080

Please sign in to comment.