You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/spec/views/legacy/categories/new.html.erb_spec.rb

33 lines
912 B

require 'rails_helper'
module Legacy
RSpec.describe "legacy/categories/new", type: :view do
before(:each) do
assign(:category, Category.new(
:name => "MyString",
:blurb => "MyString",
:description => "MyText",
:external_id => "MyString",
:parent_category_id => 1
))
end
it "renders new category form" do
render
assert_select "form[action=?][method=?]", legacy_categories_path, "post" do
assert_select "input#category_name[name=?]", "category[name]"
assert_select "input#category_blurb[name=?]", "category[blurb]"
assert_select "textarea#category_description[name=?]", "category[description]"
assert_select "input#category_external_id[name=?]", "category[external_id]"
assert_select "input#category_parent_category_id[name=?]", "category[parent_category_id]"
end
end
end
end