Skip to content

Commit

Permalink
[fix] spec failure
Browse files Browse the repository at this point in the history
  • Loading branch information
itowtips committed Apr 30, 2021
1 parent ba24377 commit 3c1fe94
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/jobs/cms/page/generate_job/article_spec.rb
Expand Up @@ -76,10 +76,9 @@
expect(File.exist?(ss_file2.public_path)).to be_truthy
expect(File.exist?(ss_file3.public_path)).to be_truthy
expect(File.exist?(ss_file4.public_path)).to be_truthy

expect(Cms::Task.count).to eq 2
Cms::Task.where(site_id: site.id, node_id: nil, name: 'cms:generate_pages').first.tap do |task|
expect(task.state).to eq 'stop'
expect(task.state).to eq 'completed'
expect(task.started).not_to be_nil
expect(task.closed).not_to be_nil
expect(task.total_count).to eq 2
Expand Down Expand Up @@ -132,7 +131,7 @@
expect(task.state).to eq 'ready'
end
Cms::Task.where(site_id: site.id, node_id: node.id, name: 'cms:generate_pages').first.tap do |task|
expect(task.state).to eq 'stop'
expect(task.state).to eq 'completed'
expect(task.started).not_to be_nil
expect(task.closed).not_to be_nil
expect(task.total_count).to eq 2
Expand Down Expand Up @@ -183,7 +182,7 @@

expect(Cms::Task.count).to eq 2
Cms::Task.where(site_id: site.id, node_id: nil, name: 'cms:generate_pages').first.tap do |task|
expect(task.state).to eq 'stop'
expect(task.state).to eq 'completed'
expect(task.started).not_to be_nil
expect(task.closed).not_to be_nil
expect(task.total_count).to eq 0
Expand Down

0 comments on commit 3c1fe94

Please sign in to comment.