Skip to content

Commit

Permalink
fix(command): removed unnecessary index in joke_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Mar 24, 2024
1 parent c863896 commit ade3f64
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkgs/command/joke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func (d dumpMongoService) Client(_ context.Context) (*mongo.Client, error) {
func TestSelectGetService(t *testing.T) {
ctx := context.Background()
testServices := []joke.GetService{
0: joke.NewJokeDevService(ctx),
1: joke.NewHumorAPIService(ctx),
2: joke.NewDatabaseJokeService(dumpMongoService{}),
joke.NewJokeDevService(ctx),
joke.NewHumorAPIService(ctx),
joke.NewDatabaseJokeService(dumpMongoService{}),
}

service, err := selectGetService(ctx, testServices)
Expand All @@ -44,9 +44,9 @@ func TestSelectGetServiceButContextCancelled(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
cancel()
testServices := []joke.GetService{
0: joke.NewJokeDevService(ctx),
1: joke.NewHumorAPIService(ctx),
2: joke.NewDatabaseJokeService(dumpMongoService{}),
joke.NewJokeDevService(ctx),
joke.NewHumorAPIService(ctx),
joke.NewDatabaseJokeService(dumpMongoService{}),
}

if _, err := selectGetService(ctx, testServices); err == nil {
Expand All @@ -57,7 +57,7 @@ func TestSelectGetServiceButContextCancelled(t *testing.T) {
func TestSelectGetServiceButServicesIsDeactivated(t *testing.T) {
ctx := context.Background()
testServices := []joke.GetService{
2: joke.NewDatabaseJokeService(dumpMongoService{}),
joke.NewDatabaseJokeService(dumpMongoService{}),
}

if _, err := selectGetService(ctx, testServices); err == nil {
Expand Down

0 comments on commit ade3f64

Please sign in to comment.