From 396f85e438ddc9bcd89f5a557980ce82b71e098b Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Thu, 18 Aug 2016 17:01:50 +0100 Subject: Add expiration date to group memberships --- spec/requests/api/members_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec/requests') diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index a56ee30f7b1..1e365bf353a 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -122,12 +122,13 @@ describe API::Members, api: true do it 'creates a new member' do expect do post api("/#{source_type.pluralize}/#{source.id}/members", master), - user_id: stranger.id, access_level: Member::DEVELOPER + user_id: stranger.id, access_level: Member::DEVELOPER, expires_at: '2016-08-05' expect(response).to have_http_status(201) end.to change { source.members.count }.by(1) expect(json_response['id']).to eq(stranger.id) expect(json_response['access_level']).to eq(Member::DEVELOPER) + expect(json_response['expires_at']).to eq('2016-08-05') end end @@ -183,11 +184,12 @@ describe API::Members, api: true do context 'when authenticated as a master/owner' do it 'updates the member' do put api("/#{source_type.pluralize}/#{source.id}/members/#{developer.id}", master), - access_level: Member::MASTER + access_level: Member::MASTER, expires_at: '2016-08-05' expect(response).to have_http_status(200) expect(json_response['id']).to eq(developer.id) expect(json_response['access_level']).to eq(Member::MASTER) + expect(json_response['expires_at']).to eq('2016-08-05') end end -- cgit v1.2.1