Sha256: 7ca86b6a2c4a5b745731bc03d9f6ac55489ea07fe69fccfc62b5d65daacb1866

Contents?: true

Size: 546 Bytes

Versions: 5

Compression:

Stored size: 546 Bytes

Contents

require 'test_helper'

module Guts
  class ApplicationControllerTest < ActionController::TestCase
    setup do
      @controller = Guts::IndexController.new
      @routes     = Engine.routes
    end

    test 'should look for layout_hook file from Rails app' do
      log_in guts_users(:regular_user)
      get :index
      assert_equal true, @response.body.include?('See you in the after')
    end

    test 'should redirect for non logged in user' do
      log_out
      get :index
      assert_redirected_to new_session_path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
guts-2.1.0 test/controllers/guts/application_controller_test.rb
guts-2.0.2 test/controllers/guts/application_controller_test.rb
guts-2.0.1 test/controllers/guts/application_controller_test.rb
guts-2.0.0 test/controllers/guts/application_controller_test.rb
guts-1.4.0 test/controllers/guts/application_controller_test.rb