Skip to content

Commit af63c7a

Browse files
committed
Little refactor over Claude code
1 parent ba5e695 commit af63c7a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test.bats

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,20 +244,23 @@ check_create_database_command() {
244244

245245
check_aljibe_config_command() {
246246

247+
local line_count
248+
247249
echo -n "Checking if aljibe-config default_site returns one line..."
248250
run ddev aljibe-config default_site
249251
assert_success
252+
250253
# Check output is not empty and has exactly one line
251254
[ -n "$output" ]
252-
local line_count=$(echo "$output" | wc -l)
255+
line_count=$(echo "$output" | wc -l)
253256
[ "$line_count" -eq 1 ]
254257
echo " Ok."
255258

256259
echo -n "Checking if aljibe-config hooks -k returns 8 lines with expected hooks..."
257260
run ddev aljibe-config hooks -k
258261
assert_success
259262
# Check we have 8 lines
260-
local line_count=$(echo "$output" | wc -l)
263+
line_count=$(echo "$output" | wc -l)
261264
[ "$line_count" -eq 8 ]
262265
# Check for each expected hook name
263266
assert_output --partial "pre_setup"
@@ -270,11 +273,11 @@ check_aljibe_config_command() {
270273
assert_output --partial "post_site_install_db"
271274
echo " Ok."
272275

273-
echo -n "Checking if aljibe-config hooks returns 8 lines with drush uli command..."
276+
echo -n "Checking if aljibe-config hooks returns 8 lines and some content..."
274277
run ddev aljibe-config hooks
275278
assert_success
276279
# Check we have 8 lines
277-
local line_count=$(echo "$output" | wc -l)
280+
line_count=$(echo "$output" | wc -l)
278281
[ "$line_count" -eq 8 ]
279282
# Check for the drush uli command
280283
assert_output --partial "drush @\${SITE_ALIAS} uli"
@@ -315,10 +318,7 @@ check_aljibe_config_command() {
315318
check_project_homepage_is_browsable
316319
check_drupal_admin_access
317320

318-
# Check create-database command
321+
# Check commands
319322
check_create_database_command
320-
321-
# Check aljibe-config command
322323
check_aljibe_config_command
323-
324324
}

0 commit comments

Comments
 (0)