aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/organisations/new.html.erb_spec.rb
blob: 948be9e57cc7d2183368379f9da6d305adcb33c8 (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 "organisations/new", type: :view do
  before(:each) do
    assign(:organisation, Organisation.new(
      name: "MyString"
    ))
  end

  it "renders new organisation form" do
    render

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

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