(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestCommand_link_withNameOverride(t *testing.T) { |
| 46 | tmpCwd := "/tmp/puma-dev-example-command-link-noargs" |
| 47 | defer MakeDirectoryOrFail(t, tmpCwd)() |
| 48 | |
| 49 | StubCommandLineArgs("link", "-n", "anothername", tmpCwd) |
| 50 | |
| 51 | WithWorkingDirectory(tmpCwd, func() { |
| 52 | actual := WithStdoutCaptured(func() { |
| 53 | if err := command(); err != nil { |
| 54 | assert.Fail(t, err.Error()) |
| 55 | } |
| 56 | }) |
| 57 | |
| 58 | assert.Equal(t, "+ App 'anothername' created, linked to '/tmp/puma-dev-example-command-link-noargs'\n", actual) |
| 59 | }) |
| 60 | |
| 61 | RemoveAppSymlinkOrFail(t, "anothername") |
| 62 | } |
| 63 | |
| 64 | func TestCommand_link_invalidDirectory(t *testing.T) { |
| 65 | StubCommandLineArgs("link", "/this/path/does/not/exist") |
nothing calls this directly
no test coverage detected