From 009d2805cbf82a1be83623312720318fea08468e Mon Sep 17 00:00:00 2001 From: sagar23sj Date: Mon, 12 Jul 2021 16:08:44 +0530 Subject: [PATCH 1/2] Resources Covered : - InteractionRestriction --- github/interactions_test.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 github/interactions_test.go diff --git a/github/interactions_test.go b/github/interactions_test.go new file mode 100644 index 00000000000..a6d3f291b26 --- /dev/null +++ b/github/interactions_test.go @@ -0,0 +1,26 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import "testing" + +func TestInteractionRestriction_Marshal(t *testing.T) { + testJSONMarshal(t, &InteractionRestriction{}, "{}") + + u := &InteractionRestriction{ + Limit: String("limit"), + Origin: String("origin"), + ExpiresAt: &Timestamp{referenceTime}, + } + + want := `{ + "limit": "limit", + "origin": "origin", + "expires_at": ` + referenceTimeStr + ` + }` + + testJSONMarshal(t, u, want) +} From d69a0cafcd9a8363e84e83fa60b27c28b50f5936 Mon Sep 17 00:00:00 2001 From: sagar23sj Date: Mon, 12 Jul 2021 16:48:49 +0530 Subject: [PATCH 2/2] fixed copyright year in new file --- github/interactions_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/interactions_test.go b/github/interactions_test.go index a6d3f291b26..47ebae18c48 100644 --- a/github/interactions_test.go +++ b/github/interactions_test.go @@ -1,4 +1,4 @@ -// Copyright 2018 The go-github AUTHORS. All rights reserved. +// Copyright 2021 The go-github AUTHORS. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.