11package integration
22
3- /*
43import (
4+ "context"
5+ "testing"
6+
57"github.com/genert/pipedrive-api/pipedrive"
68"github.com/go-test/deep"
7- "testing"
89)
910
1011func TestCurrenciesService_List (t * testing.T ) {
11- currencies , _, err := client.Currencies.List(nil)
12+ result , _ , err := client .Currencies .List (context . Background (), nil )
1213
1314if err != nil {
1415t .Errorf ("Could not get currencies: %v" , err )
1516}
1617
17- if currencies .Success != true {
18+ if result .Success != true {
1819t .Error ("Unsuccessful currencies request" )
1920}
2021
@@ -28,21 +29,21 @@ func TestCurrenciesService_List(t *testing.T) {
2829IsCustomFlag : false ,
2930}
3031
31- if diff := deep.Equal(expectedCurrency, currencies .Data[0]); diff != nil {
32+ if diff := deep .Equal (expectedCurrency , result .Data [0 ]); diff != nil {
3233t .Error (diff )
3334}
3435}
3536
3637func TestCurrenciesService_List2 (t * testing.T ) {
37- currencies , _, err := client.Currencies.List(&pipedrive.CurrenciesListOptions{
38+ result , _ , err := client .Currencies .List (context . Background (), & pipedrive.CurrenciesListOptions {
3839Term : "estonia" ,
3940})
4041
4142if err != nil {
4243t .Errorf ("Could not get currencies: %v" , err )
4344}
4445
45- if currencies .Success != true {
46+ if result .Success != true {
4647t .Error ("Unsuccessful currencies request" )
4748}
4849
@@ -56,8 +57,7 @@ func TestCurrenciesService_List2(t *testing.T) {
5657IsCustomFlag : false ,
5758}
5859
59- if diff := deep.Equal(expectedCurrency, currencies .Data[0]); diff != nil {
60+ if diff := deep .Equal (expectedCurrency , result .Data [0 ]); diff != nil {
6061t .Error (diff )
6162}
6263}
63- */
0 commit comments