Sha256: fe02fd06ac478df7fa52919bdeb23615e78136ca5d44bec3da8c4bdba3d5f551

Contents?: true

Size: 500 Bytes

Versions: 6

Compression:

Stored size: 500 Bytes

Contents

require 'test_helper'

class Lentil::LikeVotesControllerTest < ActionController::TestCase

  setup do
    @request.env['HTTP_REFERER'] = '/'
    @routes = Lentil::Engine.routes
  end

  test "should post tally" do
    post :tally, :image_id => lentil_images(:one).id
    assert_response 302
  end

  test "should save image id in session when posting a tally" do
    post :tally, :image_id => lentil_images(:one).id
    assert session["liked_images"].include?(lentil_images(:one).id.to_s)
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lentil-1.0.5 test/functional/lentil/like_votes_controller_test.rb
lentil-1.0.4 test/functional/lentil/like_votes_controller_test.rb
lentil-1.0.3 test/functional/lentil/like_votes_controller_test.rb
lentil-1.0.2 test/functional/lentil/like_votes_controller_test.rb
lentil-1.0.1 test/functional/lentil/like_votes_controller_test.rb
lentil-1.0.0 test/functional/lentil/like_votes_controller_test.rb