Sha256: f623fdb2c51844ae796cec1bf0c6b4835581994bf9d4a3a651cfe74c30b2e945

Contents?: true

Size: 694 Bytes

Versions: 2

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

describe "open_conference_ware/proposals/_transition_control.html.erb" do
  it "should render a state changing select menu with valid events and destination label" do
    aasm = double("aasm", events: [:accept, :reject], current_state: :proposed)
    proposal = stub_model(Proposal, aasm: aasm)
    assign(:proposal, proposal)
    render
    rendered.should have_selector("select[name='proposal[transition]']") do |node|
      node.should have_selector("option[value='']", text: "(currently 'Proposed')")
      node.should have_selector("option[value='accept']", text: "Accept")
      node.should have_selector("option[value='reject']", text: "Reject")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 spec/views/open_conference_ware/proposals/_transition_control.html.erb_spec.rb
open_conference_ware-1.0.0.pre3 spec/views/open_conference_ware/proposals/_transition_control.html.erb_spec.rb