Skip to content

Commit

Permalink
Added extra test in basher-upgrade.bats
Browse files Browse the repository at this point in the history
  • Loading branch information
pforret committed Mar 6, 2024
1 parent f47c2e6 commit 06bef5c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/basher-upgrade.bats
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,27 @@ load test_helper

assert [ ! -e "${BASHER_INSTALL_BIN}/second" ]
}

@test "upgrade -all upgrades all packages" {
mock_clone
create_package username/package1
basher-install username/package1
create_package username/package2
basher-install username/package2
create_exec username/package1 "second"
create_exec username/package2 "second"

basher-upgrade --all

run basher-outdated
assert_output ""

assert [ -e "${BASHER_INSTALL_BIN}/second" ]

remove_exec username/package1 "second"
run basher-outdated
assert_output "username/package1"
basher-upgrade username/package1

assert [ ! -e "${BASHER_INSTALL_BIN}/second" ]
}

0 comments on commit 06bef5c

Please sign in to comment.