Skip to content

Commit

Permalink
Merge pull request #1638 from PatrickRice-KSC/revert-project-member-c…
Browse files Browse the repository at this point in the history
…hange

Revert the change to project member accepting ISO time
  • Loading branch information
svanharmelen committed Jan 30, 2023
2 parents 36b86c5 + e21596f commit 4620d0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions project_members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"net/http"
"testing"
"time"

"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -292,21 +291,19 @@ func TestProjectMembersService_EditProjectMember(t *testing.T) {
"web_url": "http://192.168.1.8:3000/root",
"access_level": 30,
"email": "venkatesh.thalluri@example.com",
"expires_at": "2023-10-22T14:13:35Z",
"expires_at": null,
"group_saml_identity": null
}
`)
})

ExpectedExpiry := time.Date(2023, time.October, 22, 14, 13, 35, 0, time.UTC)

want := &ProjectMember{
ID: 1,
Username: "venkatesh_thalluri",
Email: "venkatesh.thalluri@example.com",
Name: "Venkatesh Thalluri",
State: "active",
ExpiresAt: &ExpectedExpiry,
ExpiresAt: nil,
AccessLevel: 30,
WebURL: "http://192.168.1.8:3000/root",
AvatarURL: "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
Expand Down
2 changes: 1 addition & 1 deletion projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ type ProjectMember struct {
Name string `json:"name"`
State string `json:"state"`
CreatedAt *time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at"`
ExpiresAt *ISOTime `json:"expires_at"`
AccessLevel AccessLevelValue `json:"access_level"`
WebURL string `json:"web_url"`
AvatarURL string `json:"avatar_url"`
Expand Down

0 comments on commit 4620d0f

Please sign in to comment.