...

Source file src/github.com/google/go-github/v55/github/interactions_test.go

Documentation: github.com/google/go-github/v55/github

     1  // Copyright 2021 The go-github AUTHORS. All rights reserved.
     2  //
     3  // Use of this source code is governed by a BSD-style
     4  // license that can be found in the LICENSE file.
     5  
     6  package github
     7  
     8  import "testing"
     9  
    10  func TestInteractionRestriction_Marshal(t *testing.T) {
    11  	testJSONMarshal(t, &InteractionRestriction{}, "{}")
    12  
    13  	u := &InteractionRestriction{
    14  		Limit:     String("limit"),
    15  		Origin:    String("origin"),
    16  		ExpiresAt: &Timestamp{referenceTime},
    17  	}
    18  
    19  	want := `{
    20  		"limit": "limit",
    21  		"origin": "origin",
    22  		"expires_at": ` + referenceTimeStr + `
    23  	}`
    24  
    25  	testJSONMarshal(t, u, want)
    26  }
    27  

View as plain text