Skip to content

Commit

Permalink
fix: v3 provider state without parameters not correctly handled
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Oct 14, 2021
1 parent d4cad1c commit b4d460b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consumer/interaction_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type InteractionV3 struct {

// Given specifies a provider state, may be called multiple times. Optional.
func (i *InteractionV3) Given(state models.ProviderStateV3) *InteractionV3 {
if len(state.Parameters) == 0 {
if len(state.Parameters) > 0 {
i.Interaction.interaction.GivenWithParameter(state.Name, state.Parameters)
} else {
i.Interaction.interaction.Given(state.Name)
Expand Down

0 comments on commit b4d460b

Please sign in to comment.