Regression test from before ExportData was implemented.
(t *testing.T)
| 30 | |
| 31 | // Regression test from before ExportData was implemented. |
| 32 | func TestJSONProject_Org(t *testing.T) { |
| 33 | project := Project{ |
| 34 | ID: "123", |
| 35 | Number: 2, |
| 36 | URL: "a url", |
| 37 | ShortDescription: "short description", |
| 38 | Public: true, |
| 39 | Readme: "readme", |
| 40 | } |
| 41 | |
| 42 | project.Items.TotalCount = 1 |
| 43 | project.Fields.TotalCount = 2 |
| 44 | project.Owner.TypeName = "Organization" |
| 45 | project.Owner.Organization.Login = "github" |
| 46 | b, err := json.Marshal(project.ExportData(nil)) |
| 47 | assert.NoError(t, err) |
| 48 | |
| 49 | assert.JSONEq(t, `{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"Organization","login":"github"}}`, string(b)) |
| 50 | } |
| 51 | |
| 52 | // Regression test from before ExportData was implemented. |
| 53 | func TestJSONProjects(t *testing.T) { |
nothing calls this directly
no test coverage detected