spec/valvat_spec.rb in valvat-0.3.6 vs spec/valvat_spec.rb in valvat-0.4.0
- old
+ new
@@ -66,9 +66,16 @@
it "returns false" do
at_vat.exists?.should eql(false)
at_vat.exist?.should eql(false)
end
end
+
+ context "with options" do
+ it "calls Valvat::Lookup.validate with options" do
+ Valvat::Lookup.should_receive(:validate).once.with(de_vat, :detail => true, :bla => 'blupp').and_return(true)
+ de_vat.exists?(:detail => true, :bla => 'blupp').should eql(true)
+ end
+ end
end
context "#iso_country_code" do
it "returns iso country code on iso_country_code" do
de_vat.iso_country_code.should eql("DE")