Skip to content

Instantly share code, notes, and snippets.

@jesuslerma
Created December 30, 2015 23:28
Show Gist options
  • Save jesuslerma/89e11ef1f102db7a5c8b to your computer and use it in GitHub Desktop.
Save jesuslerma/89e11ef1f102db7a5c8b to your computer and use it in GitHub Desktop.
Real testing
require 'rails_helper'
describe Contalink::Entries::IvaPaymentEntry do
@accounting_account = "IVA al Pago"
describe "#account_id" do
it "returns the accounting account id configured for #{@accounting_account}"
end
describe "#is_configured?" do
it "returns true when the accounting account is configured for #{@accounting_account}"
it "returns falsewhen when the accounting account is configured for #{@accounting_account}"
end
describe "#will_execute?" do
it "returns true when the reconciled status_account is retiro"
end
describe "#account_name" do
it "returns #{@accounting_account}"
end
describe "#calc_haber" do
it "always returns 0.0"
end
describe "#calc_debe" do
context "when the reconcilation is fully covered" do
context "with the invoice currency mxn" do
context "and the reconciled transaction currency is mxn" do
it "returns the iva amount of invoice"
end
context "and the reconciled transaction currency is dls" do
it "returns the iva amount of invoice"
end
end
context "whith the invoice currency dls" do
context "and the reconciled transaction currency is mxn" do
it "returns the iva amount of invoice multiplied by
the hacienda exchange rate at the invoice day"
end
context "and the reconciled transaction currency is dls" do
it "returns the iva amount of invoice multiplied by
the hacienda exchange rate at the invoice day"
end
end
end
context "when the reconcilation is partialy covered" do
context "with the invoice currency mxn" do
context "and the reconciled transaction currency is mxn" do
it "returns the partialy covered iva amount of invoice"
end
context "and the reconciled transaction currency is dls" do
it "returns the partialy covered iva amount of invoice"
end
end
context "whith the invoice currency dls" do
context "and the reconciled transaction currency is mxn" do
it "returns the partialy covered iva amount of invoice multiplied
by the hacienda exchange rate at the invoice day"
end
context "and the reconciled transaction currency is dls" do
it "returns the partialy covered iva amount of invoice multiplied
by the hacienda exchange rate at the invoice day"
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment