Commit a752c5027f0385aeda1b993f5def954c31a40ff9
1 parent
425ad631
Exists in
api_tasks
and in
4 other branches
api: fix articles_tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/api/articles_test.rb
| @@ -459,7 +459,7 @@ class ArticlesTest < ActiveSupport::TestCase | @@ -459,7 +459,7 @@ class ArticlesTest < ActiveSupport::TestCase | ||
| 459 | post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}" | 459 | post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}" |
| 460 | end | 460 | end |
| 461 | json = JSON.parse(last_response.body) | 461 | json = JSON.parse(last_response.body) |
| 462 | - assert_equal 'SuggestArticle', json['type'] | 462 | + assert_equal 'SuggestArticle', json['task']['type'] |
| 463 | end | 463 | end |
| 464 | 464 | ||
| 465 | should 'suggest event children' do | 465 | should 'suggest event children' do |
| @@ -470,7 +470,7 @@ class ArticlesTest < ActiveSupport::TestCase | @@ -470,7 +470,7 @@ class ArticlesTest < ActiveSupport::TestCase | ||
| 470 | post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}" | 470 | post "/api/v1/articles/#{article.id}/children/suggest?#{params.to_query}" |
| 471 | end | 471 | end |
| 472 | json = JSON.parse(last_response.body) | 472 | json = JSON.parse(last_response.body) |
| 473 | - assert_equal 'SuggestArticle', json['type'] | 473 | + assert_equal 'SuggestArticle', json['task']['type'] |
| 474 | end | 474 | end |
| 475 | 475 | ||
| 476 | should 'update hit attribute of article children' do | 476 | should 'update hit attribute of article children' do |