From f159aad41a0e3bf40c41932ed5a444016b6d3c40 Mon Sep 17 00:00:00 2001 From: Carlos Purificacao Date: Tue, 17 May 2016 10:36:18 -0300 Subject: [PATCH] Added test assertion on article existence --- test/api/articles_test.rb | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/test/api/articles_test.rb b/test/api/articles_test.rb index 510d702..efc7e10 100644 --- a/test/api/articles_test.rb +++ b/test/api/articles_test.rb @@ -9,11 +9,15 @@ class ArticlesTest < ActiveSupport::TestCase should 'remove article' do article = fast_create(Article, :profile_id => user.person.id, :name => "Some thing") + article = Article.find(article.id) + assert_not_nil article post "/api/v1/articles/#{article.id}/remove?#{params.to_query}" json = JSON.parse(last_response.body) assert_not_equal 401, last_response.status assert_equal true, json['success'] + + assert !Article.exists?(article.id) end should 'list articles' do -- libgit2 0.21.2