spec/store/invoice_spec.rb in caren-api-0.5.13 vs spec/store/invoice_spec.rb in caren-api-0.5.14

- old
+ new

@@ -44,20 +44,18 @@ invoice = File.read("spec/fixtures/caren_invoice.xml") invoices = File.read("spec/fixtures/caren_invoices.xml") invoices_search = File.read("spec/fixtures/caren_invoices_search.xml") invoice_url = Caren::Api.session.url_for( Caren::Store::Invoice.resource_url(17) ) - invoice_email_url = Caren::Api.session.url_for( "#{Caren::Store::Invoice.resource_url(17)}/email" ) invoices_url = Caren::Api.session.url_for( Caren::Store::Invoice.resource_url ) invoices_search_url = Caren::Api.session.url_for( "#{Caren::Store::Invoice.resource_url}?key=reference&value=NW-05463-12-0" ) timestamp = DateTime.now.to_i FakeWeb.register_uri(:get, invoices_url, :body => invoices, :signature => Caren::Api.session.sign(timestamp,nil,invoices), :timestamp => timestamp ) FakeWeb.register_uri(:get, invoices_search_url, :body => invoices_search, :signature => Caren::Api.session.sign(timestamp,nil,invoices_search), :timestamp => timestamp ) FakeWeb.register_uri(:get, invoice_url, :body => invoice, :signature => Caren::Api.session.sign(timestamp,nil,invoice), :timestamp => timestamp ) - FakeWeb.register_uri(:post, invoice_email_url, :status => 201, :signature => Caren::Api.session.sign(timestamp), :timestamp => timestamp ) FakeWeb.register_uri(:post, invoices_url, :status => 201, :signature => Caren::Api.session.sign(timestamp), :timestamp => timestamp ) FakeWeb.register_uri(:put, invoice_url, :body => invoice, :signature => Caren::Api.session.sign(timestamp,nil,invoice), :timestamp => timestamp ) FakeWeb.register_uri(:delete, invoice_url, :signature => Caren::Api.session.sign(timestamp), :timestamp => timestamp ) end @@ -82,13 +80,9 @@ lambda{ Caren::Store::Invoice.new( :reference => "JL-1" ).create(Caren::Api.session) }.should_not raise_error end it "should be able to update an invoice" do lambda{ Caren::Store::Invoice.new( :id => 17, :reference => "JL-1" ).update(Caren::Api.session) }.should_not raise_error - end - - it "should be able to email an invoice" do - lambda{ Caren::Store::Invoice.new( :id => 17 ).email(Caren::Api.session) }.should_not raise_error end it "should be able to delete an external invoice" do lambda{ Caren::Store::Invoice.new( :id => 17 ).delete(Caren::Api.session) }.should_not raise_error end