Sha256: 5cb1847fea8fff8b030264d1a2ad0eaafb811a80a3afe873ece2865a5b87f247

Contents?: true

Size: 508 Bytes

Versions: 26

Compression:

Stored size: 508 Bytes

Contents

require 'test_helper'

class Lentil::FlagsControllerTest < 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["flagged_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/flags_controller_test.rb
lentil-0.9.0 test/functional/lentil/flags_controller_test.rb
lentil-0.8.0 test/functional/lentil/flags_controller_test.rb
lentil-0.7.1 test/functional/lentil/flags_controller_test.rb
lentil-0.6.0 test/functional/lentil/flags_controller_test.rb
lentil-0.5.2 test/functional/lentil/flags_controller_test.rb
lentil-0.5.1 test/functional/lentil/flags_controller_test.rb
lentil-0.5.0 test/functional/lentil/flags_controller_test.rb
lentil-0.4.2 test/functional/lentil/flags_controller_test.rb
lentil-0.4.0 test/functional/lentil/flags_controller_test.rb
lentil-0.3.1 test/functional/lentil/flags_controller_test.rb
lentil-0.3.0 test/functional/lentil/flags_controller_test.rb
lentil-0.2.3 test/functional/lentil/flags_controller_test.rb
lentil-0.2.2 test/functional/lentil/flags_controller_test.rb
lentil-0.2.1 test/functional/lentil/flags_controller_test.rb
lentil-0.2.0 test/functional/lentil/flags_controller_test.rb
lentil-0.1.8 test/functional/lentil/flags_controller_test.rb
lentil-0.1.7 test/functional/lentil/flags_controller_test.rb
lentil-0.1.6 test/functional/lentil/flags_controller_test.rb
lentil-0.1.3 test/functional/lentil/flags_controller_test.rb