#!/usr/bin/env bats load "./test_helper" @test "dctlenv list-remote: prints an error message if curl command failed" { curlw() { exit 1; }; export -f curlw; run dctlenv list-remote assert_failure assert_output 'Failed to download remote versions from GitHub' } @test "dctlenv list-remote: returns a list of all installable versions" { curlw() { echo "$(cat ./test/mocks/list-remote.json)"; }; export -f curlw; run dctlenv list-remote assert_success assert_output <