Files
sx-fc/spec/views/employees/edit.html.erb_spec.rb
2017-10-23 11:38:10 +06:30

25 lines
648 B
Ruby
Executable File

require 'rails_helper'
RSpec.describe "employees/edit", type: :view do
before(:each) do
@employee = assign(:employee, Employee.create!(
:name => "MyString",
:role => "MyString",
:encrypted_access_code => "MyString"
))
end
it "renders the edit employee form" do
render
assert_select "form[action=?][method=?]", employee_path(@employee), "post" do
assert_select "input#employee_name[name=?]", "employee[name]"
assert_select "input#employee_role[name=?]", "employee[role]"
assert_select "input#employee_encrypted_access_code[name=?]", "employee[encrypted_access_code]"
end
end
end