Created
July 8, 2013 16:16
-
-
Save guipdutra/5950226 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'spec_helper' | |
require 'model_helper' | |
describe BudgetAllocationCapabilityChange do | |
describe '#update_budget_allocation_capability' do | |
context "when capability has movements" do | |
it "returns error" do | |
capability = Capability.make!(:reforma, :pledges => [Pledge.make!(:empenho)]) | |
budget = BudgetAllocationCapabilityChange.create(:budget_allocation_id => BudgetAllocation.make(:alocacao).id, | |
:budget_allocation_capability => BudgetAllocationCapability.make!(:capability), | |
:regulatory_act => RegulatoryAct.make!(:sopa), | |
:current_capability => capability, | |
:updated_capability => Capability.make!(:reforma)) | |
require 'pry'; binding.pry | |
expect(subject.errors[:current_capability]).to include "Há movimentações para este recurso." | |
end | |
end | |
context "when capability doesnt has movements" do | |
it "update the budget_allocation capability" do | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment