fulfillment_service_test.rb 723 B

1234567891011121314151617
  1. require 'test_helper'
  2. class FulFillmentServiceTest < Test::Unit::TestCase
  3. test 'new should create fulfillment service' do
  4. fake "fulfillment_services", :method => :post, :body => load_fixture('fulfillment_service')
  5. fulfillment_service = ShopifyAPI::FulfillmentService.new(:name => "SomeService")
  6. fulfillment_service.save
  7. assert_equal "SomeService" , fulfillment_service.name
  8. end
  9. test 'find should return the fulfillment service' do
  10. fake "fulfillment_services/123456", :method => :get, :body => load_fixture('fulfillment_service')
  11. fulfillment_service = ShopifyAPI::FulfillmentService.find(123456)
  12. assert_equal 123456 , fulfillment_service.id
  13. assert_equal "SomeService", fulfillment_service.name
  14. end
  15. end