Rubocop rules
This commit is contained in:
@@ -17,7 +17,19 @@ class CompaniesControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "should create company" do
|
||||
assert_difference("Company.count") do
|
||||
post companies_url, params: { company: { address_line_one: @company.address_line_one, address_line_two: @company.address_line_two, city: @company.city, country: @company.country, entity: @company.entity, id_number: @company.id_number, name: @company.name, postal_code: @company.postal_code, vat_number: @company.vat_number } }
|
||||
post companies_url, params: {
|
||||
company: {
|
||||
address_line_one: @company.address_line_one,
|
||||
address_line_two: @company.address_line_two,
|
||||
city: @company.city,
|
||||
country: @company.country,
|
||||
entity: @company.entity,
|
||||
id_number: @company.id_number,
|
||||
name: @company.name,
|
||||
postal_code: @company.postal_code,
|
||||
vat_number: @company.vat_number
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
assert_redirected_to company_url(Company.last)
|
||||
@@ -34,7 +46,19 @@ class CompaniesControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "should update company" do
|
||||
patch company_url(@company), params: { company: { address_line_one: @company.address_line_one, address_line_two: @company.address_line_two, city: @company.city, country: @company.country, entity: @company.entity, id_number: @company.id_number, name: @company.name, postal_code: @company.postal_code, vat_number: @company.vat_number } }
|
||||
patch company_url(@company), params: {
|
||||
company: {
|
||||
address_line_one: @company.address_line_one,
|
||||
address_line_two: @company.address_line_two,
|
||||
city: @company.city,
|
||||
country: @company.country,
|
||||
entity: @company.entity,
|
||||
id_number: @company.id_number,
|
||||
name: @company.name,
|
||||
postal_code: @company.postal_code,
|
||||
vat_number: @company.vat_number
|
||||
}
|
||||
}
|
||||
assert_redirected_to company_url(@company)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user