Sha256: 9a7c01006cb2357e2abc2ebe8f37ab4651320b110be6819842be2c41fc775dd8
Contents?: true
Size: 1.33 KB
Versions: 4
Compression:
Stored size: 1.33 KB
Contents
require 'spec/spec_helper' # Require the gem require 'lib/kashflow_api' describe KashflowApi do it "should raise an exception if username and password are not present" do lambda{ KashflowApi.configure do |c| end }.should raise_error end it "should take a username and password" do KashflowApi.configure do |c| c.username = "Test" c.password = "test" end end it "should return an array of symbols for .api_methods" do KashflowApi.configure do |c| c.username = "Test" c.password = "test" end KashflowApi.api_methods.should be_a Array KashflowApi.api_methods.first.should be_a Symbol end it "should raise an exception if username and password are wrong" do lambda{ KashflowApi.configure do |c| c.username = "Test" c.password = "test" c.loggers = false end KashflowApi::Customer.all }.should raise_error end it "should disable the loggers if requested" do KashflowApi.configure do |c| c.username = "Test" c.password = "test" c.loggers = false end KashflowApi.api_methods end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
kashflow_api-0.0.2 | spec/kashflow_api_spec.rb |
kashflow_api-0.0.1 | spec/kashflow_api_spec.rb |
kashflow_api-0.0.1rc1 | spec/kashflow_api_spec.rb |
kashflow_api-0.0.1pre | spec/kashflow_api_spec.rb |