Sha256: 41d157299a360f3efa4497404976aed802ffeb6bee13784e5e47a38cb0946629

Contents?: true

Size: 948 Bytes

Versions: 24

Compression:

Stored size: 948 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module Vedeu

  describe ApplicationController do

    let(:described) { Vedeu::ApplicationController }
    let(:instance)  { described.new(params) }
    let(:params)    { {} }

    describe '#initialize' do
      it { instance.must_be_instance_of(described) }
      it { instance.instance_variable_get('@params').must_equal(params) }
    end

    describe '#redirect_to' do
      let(:controller) {}
      let(:action)     {}
      let(:params)     { {} }

      before { Vedeu.stubs(:trigger) }

      subject { instance.redirect_to(controller, action, params) }

      it do
        Vedeu.expects(:trigger).with(:_goto_, controller, action, params)
        subject
      end
    end

    describe '#redirect' do
      it { instance.must_respond_to(:redirect) }
    end

    describe '#goto' do
      it { instance.must_respond_to(:goto) }
    end

  end # ApplicationController

end # Vedeu

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
vedeu-0.8.32 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.31 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.30 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.29 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.28 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.27 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.26 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.25 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.24 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.23 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.22 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.21 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.20 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.19 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.18 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.17 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.16 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.15 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.14 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.8.13 test/lib/vedeu/application/application_controller_test.rb