Exemple #1
0
			Expect(printedOutput).To(ContainSubstring("  Current Iteration : 15"))
		})
	})

	Describe("Activity", func() {
		BeforeEach(func() {
			json = `[
                {"message": "Wilhuff Tarkin changed iteration 1's length from default to 2 weeks"},
                {"message": "Hey Girl, I'm just like coffee. I'll keep you up all night."}
            ]`
			ts = &TestServer{
				apiToken: "abcde90792f3898ab464cd3412345",
			}
			ts.Boot()
			ts.SetResponse("/projects/124/activity", json)
			client.SetResolver(request.Resolver{
				TrackerDomain: ts.URL,
			})
		})

		It("prints a representation of the user's projects to the screen", func() {
			output := client.Activity(124)

			printedOutput := output.String()
			Expect(printedOutput).To(ContainSubstring("Activity:\n"))
			Expect(printedOutput).To(ContainSubstring("  Wilhuff Tarkin changed iteration 1's length from default to 2 weeks"))
			Expect(printedOutput).To(ContainSubstring("  Hey Girl, I'm just like coffee. I'll keep you up all night."))
		})
	})
})