Procházet zdrojové kódy

Fix blog test

L2fakeweb.
@jduff this should address the comment you had.
Lydia Krupp-Hunter před 12 roky
rodič
revize
2ae5609df4
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      test/blog_test.rb

+ 3 - 3
test/blog_test.rb

@@ -1,8 +1,8 @@
 require 'test_helper'
 require 'test_helper'
 class BlogTest < Test::Unit::TestCase
 class BlogTest < Test::Unit::TestCase
   test "blog creation" do
   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
 end
 end