Remove useless variable
This commit is contained in:
@ -555,8 +555,7 @@ func TestCreateVotes_AlreadyVoted(t *testing.T) {
|
||||
On("Exists", mock.Anything, mock.Anything).
|
||||
Return(true, nil)
|
||||
|
||||
existingElectionPath := "/election/1/votes"
|
||||
nonExistingElectionPath := "/election/1/votes"
|
||||
path := "/election/1/votes"
|
||||
voterIdentity := "anything"
|
||||
|
||||
tests := []struct {
|
||||
@ -567,7 +566,7 @@ func TestCreateVotes_AlreadyVoted(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "Invalid request for known voters election (already voted)",
|
||||
urlPath: existingElectionPath,
|
||||
urlPath: path,
|
||||
body: api.CreateVotesRequest{
|
||||
Choices: []struct {
|
||||
ChoiceText string `json:"choiceText"`
|
||||
@ -582,7 +581,7 @@ func TestCreateVotes_AlreadyVoted(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "Invalid request for unknown voters election (already voted)",
|
||||
urlPath: nonExistingElectionPath,
|
||||
urlPath: path,
|
||||
body: api.CreateVotesRequest{
|
||||
Choices: []struct {
|
||||
ChoiceText string `json:"choiceText"`
|
||||
|
Reference in New Issue
Block a user