feat: Bulk add team members in Team APIs (#1695)

This commit is contained in:
Sojan Jose
2021-01-29 12:34:52 +05:30
committed by GitHub
parent bf7915c8a3
commit f9c3b7f2f1
8 changed files with 58 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ RSpec.describe 'Teams API', type: :request do
end
it 'creates a new team when its administrator' do
params = { name: 'Test Team' }
params = { name: 'test-team' }
post "/api/v1/accounts/#{account.id}/teams",
params: params,
@@ -102,7 +102,7 @@ RSpec.describe 'Teams API', type: :request do
let(:administrator) { create(:user, account: account, role: :administrator) }
it 'returns unauthorized for agent' do
params = { name: 'New Team' }
params = { name: 'new-team' }
put "/api/v1/accounts/#{account.id}/teams/#{team.id}",
params: params,
@@ -113,7 +113,7 @@ RSpec.describe 'Teams API', type: :request do
end
it 'updates an existing team when its an administrator' do
params = { name: 'New Team' }
params = { name: 'new-team' }
put "/api/v1/accounts/#{account.id}/teams/#{team.id}",
params: params,
@@ -121,7 +121,7 @@ RSpec.describe 'Teams API', type: :request do
as: :json
expect(response).to have_http_status(:success)
expect(team.reload.name).to eq('New Team')
expect(team.reload.name).to eq('new-team')
end
end
end