Commit 64f9b09c9993f10e834e5752e78a064969fa039b

Authored by Carlos Purificação
1 parent affef2cf

Fixed test for article vote

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
test/unit/api/articles_test.rb
... ... @@ -154,7 +154,7 @@ class ArticlesTest < ActiveSupport::TestCase
154 154 post "/api/v1/articles/#{article.id}/vote?#{params.to_query}"
155 155 json = JSON.parse(last_response.body)
156 156 ## The api should not allow to save this vote
157   - assert_equal false, json['vote']
  157 + assert_equal 400, last_response.status
1
  • Me
    Michel Felipe @mfdeveloper

    For this specific situation, maybe will be better check the model validation message returned by this request. What do you think about this?

    Choose File ...   File name...
    Cancel
158 158 end
159 159  
160 160  
... ...