Sha256: 201cf7f4c9203a9607db0f3fb3b74c507bb17fef9cd5c35151019e6817b7ba9c

Contents?: true

Size: 503 Bytes

Versions: 9

Compression:

Stored size: 503 Bytes

Contents

require 'test_helper'

module Ominous
  class WarningsControllerTest < ActionController::TestCase
    
    def setup
      @warning = Ominous::Warning.find(1)
      @routes = Engine.routes # Added so that test action is matched to correct route
    end

    
    def test_dismiss
      put(
        :dismiss,
        {id: @warning},
        {:ominous_warnings => {@warning.name.to_sym => :show}}
      )
      assert_equal(:hide, session[:ominous_warnings][@warning.name.to_sym])
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ominous-0.1.3 test/functional/ominous/warnings_controller_test.rb
ominous-0.1.2 test/functional/ominous/warnings_controller_test.rb
ominous-0.1.1 test/functional/ominous/warnings_controller_test.rb
ominous-0.1.0 test/functional/ominous/warnings_controller_test.rb
ominous-0.0.5 test/functional/ominous/warnings_controller_test.rb
ominous-0.0.4 test/functional/ominous/warnings_controller_test.rb
ominous-0.0.3 test/functional/ominous/warnings_controller_test.rb
ominous-0.0.2 test/functional/ominous/warnings_controller_test.rb
ominous-0.0.1 test/functional/ominous/warnings_controller_test.rb