test/unit/models/organisation_test.rb in xeroizer-2.18.1 vs test/unit/models/organisation_test.rb in xeroizer-2.19.0
- old
+ new
@@ -33,6 +33,20 @@
assert(organisation.valid?)
end
end
+ context "parse response" do
+ it "includes payment_terms" do
+ @instance = Xeroizer::Record::OrganisationModel.new(nil, "Organisation")
+ some_xml = get_record_xml("organisations")
+
+ result = @instance.parse_response(some_xml)
+ organisation = result.response_items.first
+
+ assert_equal(organisation.payment_terms.bills.day, "4")
+ assert_equal(organisation.payment_terms.bills.type, "OFFOLLOWINGMONTH")
+ assert_equal(organisation.payment_terms.sales.day, "2")
+ assert_equal(organisation.payment_terms.sales.type, "OFFOLLOWINGMONTH")
+ end
+ end
end