Files
nairobi/spec/controllers/budgets/ballot/lines_controller_spec.rb
Javi Martín 535a039a31 Add and apply RSpec/FilePath rubocop rule
This way we make sure editors which support navigating between one class
and its test file can find the alternative files.
2021-08-09 16:51:59 +02:00

22 lines
546 B
Ruby

require "rails_helper"
describe Budgets::Ballot::LinesController do
describe "#load_budget" do
it "raises an error if budget slug is not found" do
controller.params[:budget_id] = "wrong_budget"
expect do
controller.send(:load_budget)
end.to raise_error ActiveRecord::RecordNotFound
end
it "raises an error if budget id is not found" do
controller.params[:budget_id] = 0
expect do
controller.send(:load_budget)
end.to raise_error ActiveRecord::RecordNotFound
end
end
end