Sha256: c57dc3ce656277393249868960932d5e3dcbbd6b5fa23456920fa02ea6b2364d

Contents?: true

Size: 498 Bytes

Versions: 6

Compression:

Stored size: 498 Bytes

Contents

require 'test_helper'

class Lentil::FlagsControllerTest < 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["flagged_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/flags_controller_test.rb
lentil-1.0.4 test/functional/lentil/flags_controller_test.rb
lentil-1.0.3 test/functional/lentil/flags_controller_test.rb
lentil-1.0.2 test/functional/lentil/flags_controller_test.rb
lentil-1.0.1 test/functional/lentil/flags_controller_test.rb
lentil-1.0.0 test/functional/lentil/flags_controller_test.rb