fulfillment_service_test.rb 652 B

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