@@ -123,23 +123,20 @@ subtest "static URIs" => sub {
123123
124124subtest " robots meta tag" => sub {
125125 $t -> get_ok(' /' );
126- $t -> content_lacks(' noarchive' );
127- $t -> content_lacks(' noindex' );
126+ $t -> robots_flags_ok( { archive => 1, index => 1 } );
128127
129128 subtest " 404 pages" => sub {
130129 $t -> get(' /doesnt_exist' );
131130 $t -> status_is(404);
132- $t -> content_contains(' noarchive' );
133- $t -> content_contains(' noindex' );
131+ $t -> robots_flags_ok( { archive => 0, index => 0 } );
134132 };
135133
136134 subtest " bad request pages" => sub {
137135 my $guard = $t -> local_config_guard( enable_user_registration => 1 );
138136
139137 $t -> get_ok(' /register' );
140138 $t -> submit_form_fails( { with_fields => { username => ' ' } }, " submit form" );
141- $t -> content_contains(' noarchive' );
142- $t -> content_contains(' noindex' );
139+ $t -> robots_flags_ok( { archive => 0, index => 0 } );
143140 };
144141
145142 subtest " internal server error" => sub {
@@ -151,13 +148,11 @@ subtest "robots meta tag" => sub {
151148
152149 $t -> get_ok(' /internal_server_error' );
153150 $t -> status_is(200);
154- $t -> content_contains(' noarchive' );
155- $t -> content_contains(' noindex' );
151+ $t -> robots_flags_ok( { archive => 0, index => 0 } );
156152 };
157153
158154 $t -> get_ok(' /user/john_doe' );
159- $t -> content_contains(' noarchive' );
160- $t -> content_lacks(' noindex' );
155+ $t -> robots_flags_ok( { archive => 0, index => 1 } );
161156
162157 subtest " under simulation of fatal mistake in permission" => sub {
163158 $t -> get(' /project/2/Other-Project' );
@@ -171,16 +166,14 @@ subtest "robots meta tag" => sub {
171166 $t -> reload_ok();
172167 $t -> status_is(200); # not the login page
173168
174- $t -> content_contains(' noarchive' );
175- $t -> content_contains(' noindex' );
169+ $t -> robots_flags_ok( { archive => 0, index => 0 } );
176170 };
177171
178172 $t -> max_redirect(1);
179173
180174 $t -> login_ok( ' john_doe' , ' P@ssw0rd' );
181175 $t -> get_ok(' /' );
182- $t -> content_contains(' noarchive' );
183- $t -> content_contains(' noindex' );
176+ $t -> robots_flags_ok( { archive => 0, index => 0 } );
184177};
185178
186179subtest " Redirect URL parameter" => sub {
0 commit comments