This way we'll be able to simplify it a little bit. Note that the original partial didn't include the whole row and only the cells. Since, most of the time, we include the whole row in partials, we're slightly modifying the component.
10 lines
334 B
Ruby
10 lines
334 B
Ruby
require "rails_helper"
|
|
|
|
describe Admin::BudgetInvestments::RowComponent, :admin do
|
|
it "uses a JSON request to update visible to valuators" do
|
|
render_inline Admin::BudgetInvestments::RowComponent.new(create(:budget_investment))
|
|
|
|
expect(page).to have_css "form[action$='json'] input[name$='[visible_to_valuators]']"
|
|
end
|
|
end
|