thirteen-tien-len/spec/views/commands/new.html.haml_spec.rb
2023-12-03 13:16:27 +00:00

25 lines
513 B
Ruby

require 'rails_helper'
RSpec.describe "commands/new", type: :view do
before(:each) do
assign(:command, Command.new(
name: "MyString",
trigger: "MyString",
body: "MyText"
))
end
it "renders new command form" do
render
assert_select "form[action=?][method=?]", commands_path, "post" do
assert_select "input[name=?]", "command[name]"
assert_select "input[name=?]", "command[trigger]"
assert_select "textarea[name=?]", "command[body]"
end
end
end