Sha256: c26a431830855d2f00266f9d6363aef8df76a920a488773a6394dd99c98775c6

Contents?: true

Size: 776 Bytes

Versions: 4

Compression:

Stored size: 776 Bytes

Contents

require 'spec_helper'

module YawlRails
  describe StepsController do
    before(:each) do
      @process_name = "p1-123"
      @process_id = Yawl::Process.insert(:desired_state => "testing", :name => @process_name)
      @step_id = Yawl::Step.insert(:process_id => @process_id, :name => "step1", :seq => 1)
    end

    describe "GET #show" do
      it "renders the right template" do
        get :show, :process_id => @process_name, :id => @step_id, :use_route => :yawl_rails

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

      it "assigns @step" do
        get :show, :process_id => @process_name, :id => @step_id, :use_route => :yawl_rails

        assigns(:step).id.should eq(@step_id)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yawl_rails-0.3.0 spec/controllers/yawl_rails/steps_controller_spec.rb
yawl_rails-0.2.2 spec/controllers/yawl_rails/steps_controller_spec.rb
yawl_rails-0.2.1 spec/controllers/yawl_rails/steps_controller_spec.rb
yawl_rails-0.2.0 spec/controllers/yawl_rails/steps_controller_spec.rb