Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
26a6ad48
Unverified
Commit
26a6ad48
authored
1 year ago
by
Sébastien Gaya
Browse files
Options
Downloads
Patches
Plain Diff
tests
parent
e17db24d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/models/communication/website/dependency_test.rb
+4
-4
4 additions, 4 deletions
test/models/communication/website/dependency_test.rb
with
4 additions
and
4 deletions
test/models/communication/website/dependency_test.rb
+
4
−
4
View file @
26a6ad48
...
@@ -5,11 +5,11 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
...
@@ -5,11 +5,11 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
def
test_page_dependencies
def
test_page_dependencies
# Rien : 0 dépendances
# Rien : 0 dépendances
page
=
communication_website_pages
(
:page_with_no_dependency
)
page
=
communication_website_pages
(
:page_with_no_dependency
)
assert_equal
0
,
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" : 7 dépendances (les 6 composants du chapitre + le block lui même)
page
.
blocks
.
create
(
position:
1
,
published:
true
,
template_kind: :chapter
)
page
.
blocks
.
create
(
position:
1
,
published:
true
,
template_kind: :chapter
)
assert_equal
7
,
page
.
recursive_dependencies
.
count
assert_equal
8
,
page
.
recursive_dependencies
.
count
end
end
def
test_change_block_dependencies
def
test_change_block_dependencies
...
@@ -26,7 +26,7 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
...
@@ -26,7 +26,7 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
page
=
page
.
reload
page
=
page
.
reload
assert_equal
9
,
page
.
recursive_dependencies
.
count
assert_equal
10
,
page
.
recursive_dependencies
.
count
# On modifie le target du block
# On modifie le target du block
Delayed
::
Job
.
destroy_all
Delayed
::
Job
.
destroy_all
...
@@ -35,7 +35,7 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
...
@@ -35,7 +35,7 @@ class Communication::Website::DependencyTest < ActiveSupport::TestCase
# On vérifie qu'on appelle bien la méthode destroy_obsolete_git_files sur le site de la page
# On vérifie qu'on appelle bien la méthode destroy_obsolete_git_files sur le site de la page
assert
(
destroy_obsolete_git_files_job
)
assert
(
destroy_obsolete_git_files_job
)
assert_equal
9
,
page
.
recursive_dependencies
.
count
assert_equal
10
,
page
.
recursive_dependencies
.
count
# Vérifie qu'on a bien
# Vérifie qu'on a bien
# - une tâche pour resynchroniser la page
# - une tâche pour resynchroniser la page
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment