blog_test.rb 326 B

123456789
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class BlogTest < Test::Unit::TestCase
  4. test "blog creation" do
  5. fake("blogs", method: :post, status: 202, body: load_fixture('blog'))
  6. ShopifyAPI::Blog.create(title: "Test Blog")
  7. assert_equal('{"blog":{"title":"Test Blog"}}', WebMock.last_request.body)
  8. end
  9. end