Sha256: 81c1f38d6809bf06fd7fef4ed4c86507052e49cea2fffd1f711d2d0566666738

Contents?: true

Size: 487 Bytes

Versions: 42

Compression:

Stored size: 487 Bytes

Contents

require 'test_helper'

module Edgarj
  class EdgarjControllerTest < ActionController::TestCase
    context 'login' do
      setup do
        login_as(:root)
      end

      should 'get top' do
        get :top
        assert_response :success
        assert_template 'edgarj/top'
      end
    end

    context 'not-login' do
      should 'redirect to login page' do
        get :top
        assert_equal I18n.t('edgarj.default.login_failed'), flash[:error]
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
edgarj-4.06.10 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.09 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.07 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.05 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.04 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.03 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.02 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.01 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.06.00 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.05.04 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.05.03 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.05.02 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.05.01 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.05.00 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.04.01 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.04.00 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.03.00 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.02.00 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.01.01 test/controllers/edgarj/edgarj_controller_test.rb
edgarj-4.01.00 test/controllers/edgarj/edgarj_controller_test.rb