Skip to content
Snippets Groups Projects
Unverified Commit 7eab380e authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix tests

parent 9cf701f8
No related branches found
No related tags found
No related merge requests found
class ApplicationJob < ActiveJob::Base class ApplicationJob < ActiveJob::Base
retry_on StandardError, wait: :exponentially_longer, attempts: Float::INFINITY retry_on StandardError, wait: :polynomially_longer, attempts: Float::INFINITY
# https://github.com/bensheldon/good_job?tab=readme-ov-file#labelled-jobs # https://github.com/bensheldon/good_job?tab=readme-ov-file#labelled-jobs
include GoodJob::ActiveJobExtensions::Labels include GoodJob::ActiveJobExtensions::Labels
......
...@@ -5,13 +5,13 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase ...@@ -5,13 +5,13 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
include ActiveJob::TestHelper include ActiveJob::TestHelper
def test_page_dependencies def test_page_dependencies
# Rien : 0 dépendances # Par défaut, 1 dépendance (la configuration CSP du site)
page = communication_website_pages(:page_with_no_dependency) page = communication_website_pages(:page_with_no_dependency)
assert_equal 1, page.recursive_dependencies.count assert_equal 1, page.recursive_dependencies.count
# On ajoute un block "Chapitre" : 7 dépendances (les 6 composants du chapitre + le block lui même) # On ajoute un block "Chapitre" : +1 dépendance (le block)
page.blocks.create(position: 1, published: true, template_kind: :chapter) page.blocks.create(position: 1, published: true, template_kind: :chapter)
assert_equal 8, page.recursive_dependencies.count assert_equal 2, page.recursive_dependencies.count
end end
def test_change_block_dependencies def test_change_block_dependencies
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment