Browse Source

Fix blog test

L2fakeweb.
@jduff this should address the comment you had.
Lydia Krupp-Hunter 12 years ago
parent
commit
2ae5609df4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      test/blog_test.rb

+ 3 - 3
test/blog_test.rb

@@ -1,8 +1,8 @@
 require 'test_helper'
 class BlogTest < Test::Unit::TestCase
   test "blog creation" do
-    fake "blogs", :method => :post, :status => 202
-    blog = ShopifyAPI::Blog.new(:title => "Test Blog")
-    assert_equal "Test Blog", blog.title
+    fake "blogs", :method => :post, :status => 202, :body => load_fixture('blog')
+    blog = ShopifyAPI::Blog.create(:title => "Test Blog")
+    assert_equal '{"blog":{"title":"Test Blog"}}', FakeWeb.last_request.body
   end
 end