Sha256: 54cbd6652fa66b38bd1a99c8e4b7de376cfcf8adb356a44d31e21ae48b5b01a8

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

describe "selections/edit" do
  before(:each) do
    @selection = assign(:selection, stub_model(Selection,
      :name => "MyString",
      :parent_id => 1,
      :system_code => "MyString",
      :position => 1,
      :is_default => false,
      :is_system => false
    ))
  end

  it "renders the edit selection form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => selections_path(@selection), :method => "post" do
      assert_select "input#selection_name", :name => "selection[name]"
      assert_select "input#selection_parent_id", :name => "selection[parent_id]"
      assert_select "input#selection_system_code", :name => "selection[system_code]"
      assert_select "input#selection_position", :name => "selection[position]"
      assert_select "input#selection_is_default", :name => "selection[is_default]"
      assert_select "input#selection_is_system", :name => "selection[is_system]"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
selections-0.0.1 spec/views/selections/selections/edit.html.erb_spec.rb