@@ -55,29 +55,33 @@ var _ = Describe("Account list InvoiceDetail", func() {
5555 It ("return account invoice detail" , func () {
5656 err := testhelpers .RunCobraCommand (cliCommand .Command , "123" )
5757 Expect (err ).NotTo (HaveOccurred ())
58- Expect (fakeUI .Outputs ()).To (ContainSubstring ("Item Id Category Description Single Monthly Create Date Location" ))
59- Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789 Server Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f... 10.23 20.34 2022-04-04T05:10:20Z mex01" ))
60- Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789123 server Dual E5-2690 v3 (12 Cores, 2.60 GHz) (test-vs.support2.com) 11.23 21.12 2022-04-04T05:10:21Z ams01" ))
58+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("Item Id Category Description Single Monthly Create Date Location" ))
59+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789 Server Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f... 22.59 35.26 2022-04-04 mex01" ))
60+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789123 server Dual E5-2690 v3 (12 Cores, 2.60 GHz) (test-vs.support2.com) 23.81 36.04 2022-04-04 ams01" ))
6161 })
6262 It ("return account invoice detail with additionals details" , func () {
6363 err := testhelpers .RunCobraCommand (cliCommand .Command , "123" , "--details" )
6464 Expect (err ).NotTo (HaveOccurred ())
65- Expect (fakeUI .Outputs ()).To (ContainSubstring ("Item Id Category Description Single Monthly Create Date Location" ))
66- Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789 Server Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f... 10.23 20.34 2022-04-04T05:10:20Z mex01" ))
67- Expect (fakeUI .Outputs ()).To (ContainSubstring (">>> Second Processor Intel Xeon (12 Cores, 2.40 GHz) 10.23 20.34 --- ---" ))
68- Expect (fakeUI .Outputs ()).To (ContainSubstring (">>> Operating System Virtual (up to 1Gbps) 10.23 20.34 --- ---" ))
69- Expect (fakeUI .Outputs ()).To (ContainSubstring ("123456789123 server Dual E5-2690 v3 (12 Cores, 2.60 GHz) (test-vs.support2.com) 11.23 21.12 2022-04-04T05:10:21Z ams01" ))
70- Expect (fakeUI .Outputs ()).To (ContainSubstring (">>> Second Processor Intel Xeon (12 Cores, 2.40 GHz) 11.23 21.12 --- ---" ))
71- Expect (fakeUI .Outputs ()).To (ContainSubstring (">>> Operating System Virtual (up to 1Gbps) 11.23 21.12 --- ---" ))
65+ Expect (fakeUI .Outputs ()).To (Equal (
66+ `Item Id Category Description Single Monthly Create Date Location
67+ 123456789 Server Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f... 22.59 35.26 2022-04-04 mex01
68+ >>> Server Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f... 10.23 20.34 --- ---
69+ >>> Second Processor Intel Xeon (12 Cores, 2.40 GHz) 5.24 6.12 --- ---
70+ >>> Operating System Virtual (up to 1Gbps) 7.12 8.79 --- ---
71+ 123456789123 server Dual E5-2690 v3 (12 Cores, 2.60 GHz) (test-vs.support2.com) 23.81 36.04 2022-04-04 ams01
72+ >>> server Dual E5-2690 v3 (12 Cores, 2.60 GHz) (test-vs.support2.com) 11.23 21.12 --- ---
73+ >>> Second Processor Intel Xeon (12 Cores, 2.40 GHz) 5.35 6.23 --- ---
74+ >>> Operating System Virtual (up to 1Gbps) 7.23 8.68 --- ---
75+ ` ))
7276 })
7377 It ("return account invoice detail in format json" , func () {
7478 err := testhelpers .RunCobraCommand (cliCommand .Command , "123" , "--output" , "json" )
7579 Expect (err ).NotTo (HaveOccurred ())
7680 Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Item Id": "123456789",` ))
7781 Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Category": "Server",` ))
7882 Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Description": "Dual Intel Xeon Silver 4210 (20 Cores, 2.20 GHz) (test-gpu.softlayer-community-f...",` ))
79- Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Single": "10.23 ",` ))
80- Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Monthly": "20.34 ",` ))
83+ Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Single": "22.59 ",` ))
84+ Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Monthly": "35.26 ",` ))
8185 Expect (fakeUI .Outputs ()).To (ContainSubstring (`"Location": "mex01"` ))
8286 })
8387 })
@@ -92,8 +96,8 @@ var _ = Describe("Account list InvoiceDetail", func() {
9296 err := testhelpers .RunCobraCommand (cliCommand .Command , "888" )
9397 Expect (err ).NotTo (HaveOccurred ())
9498 output := fakeUI .Outputs ()
95- Expect (output ).To (ContainSubstring ("2020-05-04T05:11:25Z None" ))
96- Expect (output ).To (ContainSubstring ("2020-05-04T05:11:25Z tok02" ))
99+ Expect (output ).To (ContainSubstring ("2020-05-04 None" ))
100+ Expect (output ).To (ContainSubstring ("0.00 0.00 2020-05-04 tok02" ))
97101 })
98102 })
99103 })
0 commit comments