aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/events/new.html.erb_spec.rb
blob: cf385aa6a7b3386304d4da33ac2c9fc2ba3aeea2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'rails_helper'

RSpec.describe "events/new", type: :view do
  before(:each) do
    assign(:event, Event.new(
      name: "MyString"
    ))
  end

  it "renders new event form" do
    render

    assert_select "form[action=?][method=?]", events_path, "post" do

      assert_select "input[name=?]", "event[name]"
    end
  end
end