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.

24 lines
576 B

require "rails_helper"
module Dashboard
include Engine.routes.url_helpers
RSpec.describe "dashboard/examples/new", type: :view do
before(:each) do
assign(:example, Example.new(
text: "MyString",
body: "MyText"
))
end
it "renders new example form" do
render
assert_select "form[action=?][method=?]", examples_path, "post" do
assert_select "input[name=?]", "example[text]"
assert_select "textarea[name=?]", "example[body]"
end
end
end
end