aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/events/edit.html.erb_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/events/edit.html.erb_spec.rb')
-rw-r--r--spec/views/events/edit.html.erb_spec.rb22
1 files changed, 22 insertions, 0 deletions
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