|
@@ -6,24 +6,28 @@ class ArticleTest < Test::Unit::TestCase
|
|
|
fake "articles/6242736", :method => :get, :body => load_fixture('article')
|
|
|
article = ShopifyAPI::Article.find(6242736)
|
|
|
assert_equal "First Post", article.title
|
|
|
+ assert_equal 1008414260, article.blog_id
|
|
|
end
|
|
|
|
|
|
def test_get_articles
|
|
|
fake "articles", :method => :get, :body => load_fixture('articles')
|
|
|
articles = ShopifyAPI::Article.all
|
|
|
assert_equal 3, articles.length
|
|
|
+ assert_equal 1008414260, articles.first.blog_id
|
|
|
end
|
|
|
|
|
|
def test_get_articles_namespaced
|
|
|
fake "blogs/1008414260/articles", :method => :get, :body => load_fixture('articles')
|
|
|
articles = ShopifyAPI::Article.find(:all, :params => {:blog_id => 1008414260})
|
|
|
assert_equal 3, articles.length
|
|
|
+ assert_equal 1008414260, articles.first.blog_id
|
|
|
end
|
|
|
|
|
|
def test_get_article_namespaced
|
|
|
fake "blogs/1008414260/articles/6242736", :method => :get, :body => load_fixture('article')
|
|
|
article = ShopifyAPI::Article.find(6242736, :params => {:blog_id => 1008414260})
|
|
|
assert_equal "First Post", article.title
|
|
|
+ assert_equal 1008414260, article.blog_id
|
|
|
end
|
|
|
|
|
|
def test_get_authors
|