forked from Mirrors/go-iap
Merge pull request #99 from jun06t/error-message
Fixed test error messages
This commit is contained in:
@@ -74,7 +74,7 @@ func TestNewWithClient(t *testing.T) {
|
|||||||
func TestAcknowledgeSubscription(t *testing.T) {
|
func TestAcknowledgeSubscription(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
// Exception scenario
|
// Exception scenario
|
||||||
expected := "googleapi: Error 404: No application was found for the given package name., applicationNotFound"
|
expected := "googleapi: Error 400: Invalid Value, invalid"
|
||||||
|
|
||||||
client, _ := New(jsonKey)
|
client, _ := New(jsonKey)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -93,7 +93,7 @@ func TestAcknowledgeSubscription(t *testing.T) {
|
|||||||
func TestVerifySubscription(t *testing.T) {
|
func TestVerifySubscription(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
// Exception scenario
|
// Exception scenario
|
||||||
expected := "googleapi: Error 404: No application was found for the given package name., applicationNotFound"
|
expected := "googleapi: Error 400: Invalid Value, invalid"
|
||||||
|
|
||||||
client, _ := New(jsonKey)
|
client, _ := New(jsonKey)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -121,7 +121,7 @@ func TestVerifySubscriptionAndroidPublisherError(t *testing.T) {
|
|||||||
func TestVerifyProduct(t *testing.T) {
|
func TestVerifyProduct(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
// Exception scenario
|
// Exception scenario
|
||||||
expected := "googleapi: Error 404: No application was found for the given package name., applicationNotFound"
|
expected := "googleapi: Error 400: Invalid Value, invalid"
|
||||||
|
|
||||||
client, _ := New(jsonKey)
|
client, _ := New(jsonKey)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -159,7 +159,7 @@ func TestCancelSubscription(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client, _ = New(jsonKey)
|
client, _ = New(jsonKey)
|
||||||
expectedStr := "googleapi: Error 404: No application was found for the given package name., applicationNotFound"
|
expectedStr := "googleapi: Error 400: Invalid Value, invalid"
|
||||||
actual = client.CancelSubscription(ctx, "package", "productID", "purchaseToken")
|
actual = client.CancelSubscription(ctx, "package", "productID", "purchaseToken")
|
||||||
|
|
||||||
if actual.Error() != expectedStr {
|
if actual.Error() != expectedStr {
|
||||||
|
|||||||
Reference in New Issue
Block a user