Sha256: 0d369e63548b173e9156c8dc8353a269519c787624796bb94a644466ac8ab4c7

Contents?: true

Size: 769 Bytes

Versions: 1

Compression:

Stored size: 769 Bytes

Contents

require 'test_helper'

module Vedeu

  module Bindings

	  describe Application do

      context 'the application specific events are defined' do
        it { Vedeu.bound?(:_action_).must_equal(true) }
      end

      describe '.action!' do
        let(:controller) { :some_controller }
        let(:action)     { :show_basket }
        let(:args)       {
          {
            customer_id: 3,
            product_id: 16,
          }
        }

        before { Vedeu::Router.stubs(:goto) }

        subject { Vedeu.trigger(:_action_, controller, action, **args) }

        it {
          Vedeu::Router.expects(:goto)
            .with(:some_controller, :show_basket, args)
          subject
        }
      end

	  end # Application

  end # Bindings

end # Vedeu

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.4.62 test/lib/vedeu/bindings/application_test.rb