Sha256: 89867d95956dd1d811071aa3af90b60421912dc49fd4fcba01c3e17eb01a92a1
Contents?: true
Size: 805 Bytes
Versions: 1
Compression:
Stored size: 805 Bytes
Contents
require 'spec_helper' describe "open_conference_ware/proposals/_room_control.html.erb" do it "should render a selector for choosing a room" do rooms = [ stub_model(Room, id: 1, name: "First Room"), stub_model(Room, id: 2, name: "Second Room"), ] event = stub_model(Event) event.stub(:rooms).and_return(rooms) proposal = stub_model(Proposal, room: rooms.first, room_id: rooms.first.id, event: event) assign(:proposal, proposal) render rendered.should have_selector("select[name='proposal[room_id]']") do |node| node.should have_selector("option[value='']", text: "- None -") node.should have_selector("option[value='1'][selected]", text: "First Room") node.should have_selector("option[value='2']", text: "Second Room") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
open_conference_ware-1.0.0.pre1 | spec/views/open_conference_ware/proposals/_room_control.html.erb_spec.rb |