diff --git a/tests/integration/app_cmd.bats b/tests/integration/app_cmd.bats index b7762600..0c14a344 100644 --- a/tests/integration/app_cmd.bats +++ b/tests/integration/app_cmd.bats @@ -40,7 +40,7 @@ teardown(){ assert_success assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE" - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd assert_success assert_output --partial 'baz' @@ -52,7 +52,7 @@ teardown(){ assert_success assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd assert_failure assert_output --partial 'locally unstaged changes' @@ -65,7 +65,7 @@ teardown(){ assert_success assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local --chaos + run $ABRA app cmd --local --chaos "$TEST_APP_DOMAIN" test_cmd assert_success assert_output --partial 'baz' @@ -78,14 +78,14 @@ teardown(){ assert_success run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status - assert_output --partial 'behind 3' + assert_output --partial 'Your branch is behind' - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd assert_success assert_output --partial 'baz' run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status - refute_output --partial 'behind 3' + assert_output --partial 'Your branch is up to date' _reset_recipe "$TEST_RECIPE" } @@ -95,14 +95,14 @@ teardown(){ assert_success run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status - assert_output --partial 'behind 3' + assert_output --partial 'Your branch is behind' - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local --offline + run $ABRA app cmd --local --offline "$TEST_APP_DOMAIN" test_cmd assert_success assert_output --partial 'baz' run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" status - assert_output --partial 'behind 3' + assert_output --partial 'Your branch is behind' _reset_recipe "$TEST_RECIPE" } @@ -120,7 +120,7 @@ teardown(){ } @test "cannot use --local and --user at same time" { - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local --user root + run $ABRA app cmd --local --user root "$TEST_APP_DOMAIN" test_cmd assert_failure assert_output --partial 'cannot use --local & --user together' } @@ -129,7 +129,7 @@ teardown(){ run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE/abra.sh" assert_success - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local --chaos + run $ABRA app cmd --local --chaos "$TEST_APP_DOMAIN" test_cmd assert_failure assert_output --partial "$ABRA_DIR/recipes/$TEST_RECIPE/abra.sh does not exist" @@ -137,25 +137,25 @@ teardown(){ } @test "error if missing command" { - run $ABRA app cmd "$TEST_APP_DOMAIN" doesnt_exist --local + run $ABRA app cmd --local "$TEST_APP_DOMAIN" doesnt_exist assert_failure assert_output --partial "doesn't have a doesnt_exist function" } @test "run --local command" { - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd --local + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd assert_success assert_output --partial 'baz' } @test "run command with single arg" { - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd_arg --local -- bing + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_arg bing assert_success assert_output --partial 'bing' } @test "run command with several args" { - run $ABRA app cmd "$TEST_APP_DOMAIN" test_cmd_args --local -- bong bang + run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_args bong bang assert_success assert_output --partial 'bong bang' }