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