Skip to content

Commit

Permalink
Updates test fir empty subscription id
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysoev committed Aug 19, 2024
1 parent 96d5f93 commit a357bdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package deriv

import (
"context"
"errors"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -56,15 +55,14 @@ func TestParseSubscription_EmptyInput(t *testing.T) {

func TestParseSubscription_EmptySubscriptionData(t *testing.T) {
input := []byte(`{}`)
expectedErr := ErrEmptySubscriptionID

_, err := parseSubsciption(input)
if err == nil {
t.Errorf("Expected an error, but got nil")
}

if errors.Is(err, expectedErr) {
t.Errorf("Expected %+v, but got %+v", expectedErr, err)
if err != ErrEmptySubscriptionID {
t.Errorf("Expected '%+v', but got '%+v'", ErrEmptySubscriptionID, err)
}
}

Expand Down

0 comments on commit a357bdb

Please sign in to comment.