app_runner.RouteOverride{ HostnamePrefix: "bar.com", Port: 9090, }, } args := []string{ "cool-web-app", "8080:foo.com,9090:bar.com", } test_helpers.ExecuteCommandWithArgs(updateRoutesCommand, args) Expect(outputBuffer).To(test_helpers.Say("Updating cool-web-app routes. You can check this app's current routes by running 'ltc status cool-web-app'")) Expect(fakeAppRunner.UpdateAppRoutesCallCount()).To(Equal(1)) name, routeOverrides := fakeAppRunner.UpdateAppRoutesArgsForCall(0) Expect(name).To(Equal("cool-web-app")) Expect(routeOverrides).To(Equal(expectedRouteOverrides)) }) Context("when the --no-routes flag is passed", func() { It("deregisters all the routes", func() { args := []string{ "cool-web-app", "--no-routes", } test_helpers.ExecuteCommandWithArgs(updateRoutesCommand, args) Expect(outputBuffer).To(test_helpers.Say("Updating cool-web-app routes. You can check this app's current routes by running 'ltc status cool-web-app'"))