user_test.rb 492 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class UserTest < Test::Unit::TestCase
  4. test 'get should get a user' do
  5. fake 'users/799407056', method: :get, status: 200, body: load_fixture('user')
  6. user = ShopifyAPI::User.find(799407056)
  7. assert_equal 799407056, user.id
  8. end
  9. test 'get should get all users' do
  10. fake 'users', method: :get, status: 200, body: load_fixture('users')
  11. users = ShopifyAPI::User.all
  12. assert_equal 799407056, users.first.id
  13. end
  14. end