ESheahan/espolea

View on GitHub
spec/views/schedules/new.html.erb_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'rails_helper'

RSpec.describe "schedules/new", type: :view do
  before(:each) do
    assign(:schedule, Schedule.new(
      :treatment_options => "MyString"
    ))
  end

  it "renders new schedule form" do
    render

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

      assert_select "input#schedule_treatment_options[name=?]", "schedule[treatment_options]"
    end
  end
end