Commit 498e439d authored by Etienne Baqué's avatar Etienne Baqué

Exposed created_at to billable members API

Changelog: added
EE: true
parent 6ac1e277
...@@ -292,7 +292,8 @@ Example response: ...@@ -292,7 +292,8 @@ Example response:
"web_url": "http://192.168.1.8:3000/root", "web_url": "http://192.168.1.8:3000/root",
"last_activity_on": "2021-01-27", "last_activity_on": "2021-01-27",
"membership_type": "group_member", "membership_type": "group_member",
"removable": true "removable": true,
"created_at": "2021-01-03T12:16:02.000Z"
}, },
{ {
"id": 2, "id": 2,
...@@ -304,7 +305,8 @@ Example response: ...@@ -304,7 +305,8 @@ Example response:
"email": "john@example.com", "email": "john@example.com",
"last_activity_on": "2021-01-25", "last_activity_on": "2021-01-25",
"membership_type": "group_member", "membership_type": "group_member",
"removable": true "removable": true,
"created_at": "2021-01-04T18:46:42.000Z"
}, },
{ {
"id": 3, "id": 3,
...@@ -315,7 +317,8 @@ Example response: ...@@ -315,7 +317,8 @@ Example response:
"web_url": "http://192.168.1.8:3000/root", "web_url": "http://192.168.1.8:3000/root",
"last_activity_on": "2021-01-20", "last_activity_on": "2021-01-20",
"membership_type": "group_invite", "membership_type": "group_invite",
"removable": false "removable": false,
"created_at": "2021-01-09T07:12:31.000Z"
} }
] ]
``` ```
......
...@@ -8,6 +8,7 @@ module EE ...@@ -8,6 +8,7 @@ module EE
expose :last_activity_on expose :last_activity_on
expose :membership_type expose :membership_type
expose :removable expose :removable
expose :created_at
private private
......
...@@ -21,6 +21,10 @@ RSpec.describe ::EE::API::Entities::BillableMember do ...@@ -21,6 +21,10 @@ RSpec.describe ::EE::API::Entities::BillableMember do
expect(entity_representation[:last_activity_on]).to eq last_activity_on expect(entity_representation[:last_activity_on]).to eq last_activity_on
end end
it 'exposes the created_at field' do
expect(entity_representation[:created_at]).to eq(member.created_at)
end
context 'when the user has a public_email assigned' do context 'when the user has a public_email assigned' do
let(:public_email) { 'public@email.com' } let(:public_email) { 'public@email.com' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment