@@ -86,7 +86,7 @@ class StandardEdition::ChildDocumentTest < ActiveSupport::TestCase
8686 assert_equal "#{ parent_edition . base_path } /foo" , child_edition . base_path
8787 end
8888
89- test "can_be_published ? returns true if parent edition is not in a pre-publication state AND parent document is 'published'" do
89+ test "parent_allows_publishing ? returns true if parent edition is not in a pre-publication state AND parent document is 'published'" do
9090 parent_document = create ( :document )
9191 parent_edition = create ( :superseded_standard_edition , document : parent_document )
9292 create ( :published_standard_edition , document : parent_document ) # Live Parent
@@ -100,10 +100,10 @@ class StandardEdition::ChildDocumentTest < ActiveSupport::TestCase
100100 )
101101 relationship . save! ( validate : false )
102102
103- assert child_edition . can_be_published ?
103+ assert child_edition . parent_allows_publishing ?
104104 end
105105
106- test "can_be_published ? returns false if parent edition is in a pre-publication state, despite the parent document being published" do
106+ test "parent_allows_publishing ? returns false if parent edition is in a pre-publication state, despite the parent document being published" do
107107 Edition ::PRE_PUBLICATION_STATES . each do |state |
108108 parent_document = create ( :document )
109109 create ( :published_standard_edition , document : parent_document ) # Live Parent...
@@ -117,11 +117,11 @@ class StandardEdition::ChildDocumentTest < ActiveSupport::TestCase
117117 child_document :,
118118 )
119119
120- assert_not child_edition . can_be_published ?
120+ assert_not child_edition . parent_allows_publishing ?
121121 end
122122 end
123123
124- test "can_be_published ? returns false if parent edition is not in a pre-publication state and parent document is not 'published'" do
124+ test "parent_allows_publishing ? returns false if parent edition is not in a pre-publication state and parent document is not 'published'" do
125125 parent_document = create ( :document )
126126 parent_edition = create ( :withdrawn_standard_edition , document : parent_document )
127127 create ( :draft_standard_edition , document : parent_document )
@@ -135,6 +135,6 @@ class StandardEdition::ChildDocumentTest < ActiveSupport::TestCase
135135 )
136136 relationship . save! ( validate : false )
137137
138- assert_not child_edition . can_be_published ?
138+ assert_not child_edition . parent_allows_publishing ?
139139 end
140140end
0 commit comments