Skip to content

Commit

Permalink
✅ Add test case for no registries configured
Browse files Browse the repository at this point in the history
  • Loading branch information
monry committed Jun 16, 2019
1 parent a585214 commit 6c27081
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fixtures/empty.upm-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"registries": {
}
}
11 changes: 11 additions & 0 deletions tests/upm-init.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ function teardown() {
temp_del "${TEST_TEMP_DIR}"
}

@test "upm-init / no registry configured" {
cp "$( dirname ${BATS_TEST_DIRNAME} )"/fixtures/empty.upm-config.json ~/.upm-config.json
cwd=$(pwd)
cd $TEST_TEMP_DIR
run ${cwd}/upm init <<<"Test.Project
Test Project
Description"

assert_output -p "No registries configured"
}

@test "upm-init / single registry configured (STDIN)" {
cp "$( dirname ${BATS_TEST_DIRNAME} )"/fixtures/single.upm-config.json ~/.upm-config.json
cwd=$(pwd)
Expand Down

0 comments on commit 6c27081

Please sign in to comment.