fix tests to account for padding

This commit is contained in:
nate smith 2022-03-29 10:44:48 -05:00
parent dc03417042
commit 2712ef05df

View file

@ -95,7 +95,7 @@ func TestStatusRun(t *testing.T) {
httpmock.StringResponse(`[]`))
},
opts: &StatusOptions{},
wantOut: "Assigned Issues │Assigned PRs \nNothing here ^_^ │Nothing here ^_^ \n │ \nReview Requests │Mentions \nNothing here ^_^ │Nothing here ^_^ \n │ \nRepository Activity\nNothing here ^_^\n\n",
wantOut: "Assigned Issues │ Assigned Pull Requests \nNothing here ^_^ │ Nothing here ^_^ \n │ \nReview Requests │ Mentions \nNothing here ^_^ │ Nothing here ^_^ \n │ \nRepository Activity\nNothing here ^_^\n\n",
},
{
name: "something",
@ -144,7 +144,7 @@ func TestStatusRun(t *testing.T) {
httpmock.FileResponse("./fixtures/events.json"))
},
opts: &StatusOptions{},
wantOut: "Assigned Issues │Assigned PRs \nvilmibm/testing#157 yolo │cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │Mentions \ncli/cli#5272 Pin extensions │rpd/todo#110 hello @j...\nvilmibm/testing#1234 Foobar │cli/cli#1096 @jillval...\nrpd/todo#50 Welcome party...│vilmibm/gh-screensaver#15 a messag...\ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on W...\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\ncli/cli#5319 comment on [Codespaces] D... Wondering if we shouldn't...\ncli/cli#5300 new issue Terminal bell when a runn...\n\n",
wantOut: "Assigned Issues │ Assigned Pull Requests \nvilmibm/testing#157 yolo │ cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│ rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│ cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │ Mentions \ncli/cli#5272 Pin extensions │ rpd/todo#110 hello @j...\nvilmibm/testing#1234 Foobar │ cli/cli#1096 @jillval...\nrpd/todo#50 Welcome party...│ vilmibm/gh-screensaver#15 a messag...\ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on W...\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\ncli/cli#5319 comment on [Codespaces] D... Wondering if we shouldn't...\ncli/cli#5300 new issue Terminal bell when a runn...\n\n",
},
{
name: "exclude a repository",
@ -191,7 +191,7 @@ func TestStatusRun(t *testing.T) {
},
// NOTA BENE: you'll see cli/cli in search results because that happens
// server side and the fixture doesn't account for that
wantOut: "Assigned Issues │Assigned PRs \nvilmibm/testing#157 yolo │cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │Mentions \ncli/cli#5272 Pin extensions │rpd/todo#110 hello @j...\nvilmibm/testing#1234 Foobar │vilmibm/gh-screensaver#15 a messag...\nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on W...\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\n\n",
wantOut: "Assigned Issues │ Assigned Pull Requests \nvilmibm/testing#157 yolo │ cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│ rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│ cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │ Mentions \ncli/cli#5272 Pin extensions │ rpd/todo#110 hello @j...\nvilmibm/testing#1234 Foobar │ vilmibm/gh-screensaver#15 a messag...\nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on W...\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\n\n",
},
{
name: "exclude repositories",
@ -220,7 +220,7 @@ func TestStatusRun(t *testing.T) {
},
// NOTA BENE: you'll see cli/cli in search results because that happens
// server side and the fixture doesn't account for that
wantOut: "Assigned Issues │Assigned PRs \nvilmibm/testing#157 yolo │cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │Mentions \ncli/cli#5272 Pin extensions │vilmibm/gh-screensaver#15 a messag...\nvilmibm/testing#1234 Foobar │ \nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\n\n",
wantOut: "Assigned Issues │ Assigned Pull Requests \nvilmibm/testing#157 yolo │ cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│ rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│ cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │ Mentions \ncli/cli#5272 Pin extensions │ vilmibm/gh-screensaver#15 a messag...\nvilmibm/testing#1234 Foobar │ \nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nvilmibm/testing#5325 comment on Ability to sea... We are working on dedicat...\n\n",
},
{
name: "filter to an org",
@ -259,7 +259,7 @@ func TestStatusRun(t *testing.T) {
opts: &StatusOptions{
Org: "rpd",
},
wantOut: "Assigned Issues │Assigned PRs \nvilmibm/testing#157 yolo │cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │Mentions \ncli/cli#5272 Pin extensions │rpd/todo#110 hello @jillvalentine ...\nvilmibm/testing#1234 Foobar │ \nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on Windows where it is needed\n\n",
wantOut: "Assigned Issues │ Assigned Pull Requests \nvilmibm/testing#157 yolo │ cli/cli#5272 Pin extensions \ncli/cli#3223 Repo garden...│ rpd/todo#73 Board up RPD windows \nrpd/todo#514 Reducing zo...│ cli/cli#4768 Issue Frecency \nvilmibm/testing#74 welp │ \nadreyer/arkestrator#22 complete mo...│ \n │ \nReview Requests │ Mentions \ncli/cli#5272 Pin extensions │ rpd/todo#110 hello @jillvalentine ...\nvilmibm/testing#1234 Foobar │ \nrpd/todo#50 Welcome party...│ \ncli/cli#4671 This pull req...│ \nrpd/todo#49 Haircut for Leon│ \n │ \nRepository Activity\nrpd/todo#5326 new PR Only write UTF-8 BOM on Windows where it is needed\n\n",
},
}