From c84b94a647fb4c068e8be9d0495ff7284f41f168 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 17 Dec 2023 14:26:17 +0000 Subject: Initial --- spec/views/events/edit.html.erb_spec.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 spec/views/events/edit.html.erb_spec.rb (limited to 'spec/views/events/edit.html.erb_spec.rb') diff --git a/spec/views/events/edit.html.erb_spec.rb b/spec/views/events/edit.html.erb_spec.rb new file mode 100644 index 0000000..f6ad92e --- /dev/null +++ b/spec/views/events/edit.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'rails_helper' + +RSpec.describe "events/edit", type: :view do + let(:event) { + Event.create!( + name: "MyString" + ) + } + + before(:each) do + assign(:event, event) + end + + it "renders the edit event form" do + render + + assert_select "form[action=?][method=?]", event_path(event), "post" do + + assert_select "input[name=?]", "event[name]" + end + end +end -- cgit v1.2.3