Browse Source

added article create test

Kevin Hughes 11 years ago
parent
commit
51b97c4594
1 changed files with 7 additions and 0 deletions
  1. 7 0
      test/article_test.rb

+ 7 - 0
test/article_test.rb

@@ -2,6 +2,13 @@ require 'test_helper'
 
 class ArticleTest < Test::Unit::TestCase
 
+  def test_create_article
+    fake "blogs/1008414260/articles", :method => :post, :body => load_fixture('article')
+    article = ShopifyAPI::Article.new(:blog_id => 1008414260)
+    article.save
+    assert_equal "First Post", article.title
+  end
+
   def test_get_article
     fake "articles/6242736", :method => :get, :body => load_fixture('article')
     article = ShopifyAPI::Article.find(6242736)