You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: votes_controller_test.rb
    path of file: ./repos/mushroom-observer/test/controllers/images
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require("test_helper")

# tests of Transforms controller
module Images
  class VotesControlle
    
    def test_cast_vote_next
      user = users(:mary)
      image = images(:in_situ_image)
      value = Image.maximum_vote
      login(user.login)

      assert_difference("ImageVote.count", 1, "Failed to cast vote") do
        put(:update, params: { image_id: image.id, value: value, next: true })
      end
      assert_redirected_to(
        image_path(id: image.id, q: QueryRecord.last.id.alphabetize)
      )
      vote = ImageVote.last
      assert(vote.image == image && vote.user == user && vote.value == value,
             "Vote not cast correctly")
    end