Skip to content

Commit

Permalink
test consistent languages output in bdd style
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Malinovskii committed Jun 19, 2024
1 parent 42615b2 commit 98fd2e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 31 deletions.
4 changes: 4 additions & 0 deletions internal/app/app.feature
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ Feature: Application command line tool
| <flag> |
| -languages |
| --languages |

Scenario: User wants to see consistent supported natural languages output
When the user lists supported natural languages several times
Then the output is the same
13 changes: 13 additions & 0 deletions internal/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ func TestApplicationCommandLineTool(t *testing.T) {
})
}
})

t.Run("User wants to see consistent supported natural languages output", func(t *testing.T) {
t.Parallel()

// When the user lists supported natural languages several times.
arguments := []string{"-languages"}

out1 := runApp(t, arguments, true)
out2 := runApp(t, arguments, true)

// Then the output is the same.
assert.Equal(t, out1, out2)
})
}

func TestApplicationCommandLineToolCustom(t *testing.T) {
Expand Down
31 changes: 0 additions & 31 deletions internal/app/languages_private_test.go

This file was deleted.

0 comments on commit 98fd2e6

Please sign in to comment.