Sha256: 7d30f56d9fa4ce5d5a1781389be90e4b5978153473bdfc67433061316ebba412

Contents?: true

Size: 586 Bytes

Versions: 15

Compression:

Stored size: 586 Bytes

Contents

require 'rails_helper'

RSpec.describe "products/edit", :type => :view do
  before(:each) do
    @product = assign(:product, Product.create!(
      :name => "MyString",
      :code => "MyString",
      :price => "9.99"
    ))
  end

  it "renders the edit product form" do
    render

    assert_select "form[action=?][method=?]", product_path(@product), "post" do

      assert_select "input#product_name[name=?]", "product[name]"

      assert_select "input#product_code[name=?]", "product[code]"

      assert_select "input#product_price[name=?]", "product[price]"
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
restspec-0.3.2 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.3.1 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.3.0 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.6 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.5 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.4 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.3 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.2 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2.1 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.2 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.1 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.0.4 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.0.3 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.0.2 examples/store-api/spec/views/products/edit.html.erb_spec.rb
restspec-0.0.1 examples/store-api/spec/views/products/edit.html.erb_spec.rb