Sha256: 3b9211282372a4b85d85c7af3d6ce873c5db7ecfedcd9b376e216fc780094665

Contents?: true

Size: 510 Bytes

Versions: 26

Compression:

Stored size: 510 Bytes

Contents

require 'test_helper'

class Lentil::LikeVotesControllerTest < ActionController::TestCase

  setup do
    @request.env['HTTP_REFERER'] = '/'
  end

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

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

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
lentil-0.9.1 test/functional/lentil/like_votes_controller_test.rb
lentil-0.9.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.8.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.7.1 test/functional/lentil/like_votes_controller_test.rb
lentil-0.6.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.5.2 test/functional/lentil/like_votes_controller_test.rb
lentil-0.5.1 test/functional/lentil/like_votes_controller_test.rb
lentil-0.5.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.4.2 test/functional/lentil/like_votes_controller_test.rb
lentil-0.4.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.3.1 test/functional/lentil/like_votes_controller_test.rb
lentil-0.3.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.2.3 test/functional/lentil/like_votes_controller_test.rb
lentil-0.2.2 test/functional/lentil/like_votes_controller_test.rb
lentil-0.2.1 test/functional/lentil/like_votes_controller_test.rb
lentil-0.2.0 test/functional/lentil/like_votes_controller_test.rb
lentil-0.1.8 test/functional/lentil/like_votes_controller_test.rb
lentil-0.1.7 test/functional/lentil/like_votes_controller_test.rb
lentil-0.1.6 test/functional/lentil/like_votes_controller_test.rb
lentil-0.1.3 test/functional/lentil/like_votes_controller_test.rb