Sha256: 8e1f5ba4eaf73e1c7ebd5c72269f353b8635cf8d4fa14b5dfce90035ee5bf302

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

require 'spec_helper'

module YawlRails
  describe ProcessesController do
    describe "GET #index" do
      it "renders the right template" do
        get :index, use_route: :yawl_rails

        expect(response).to be_success
        expect(response).to render_template("index")
      end

      it "loads all yawl processes into @processes" do
        @p1 = ::Yawl::Process.insert(:desired_state => "test1")
        @p2 = ::Yawl::Process.insert(:desired_state => "test1")

        get :index, use_route: :yawl_rails

        assigns(:processes).map(&:id).should match_array([@p2, @p1])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yawl_rails-0.1.1 spec/controllers/yawl_rails/processes_controller_spec.rb
yawl_rails-0.1.0 spec/controllers/yawl_rails/processes_controller_spec.rb