Commit 18297e20 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'add-roulette-json' into 'master'

Add a roulette.json file to about.gitlab.com

See merge request !19132
parents d768f7ae 7825c617
Pipeline #47306163 passed with stages
in 12 minutes and 30 seconds
- # Filter out members who can't possibly review anything
- team = data.team.select { |member| member.type == 'person' && member.gitlab && member.name && member.projects }
= team.map { |member| { username: member.gitlab, name: member.name, projects: member.projects } }.to_json
require 'spec_helper'
describe 'the generated /roulette.json response' do
before do
visit '/roulette.json'
end
subject(:json_response) { JSON.parse(page.body) }
it 'has the right content-type' do
expect(page.response_headers['Content-Type']).to eq('application/json')
end
it 'includes name for all people' do
is_expected.to all(include('name' => be_a(String)))
end
it 'includes username for all people' do
is_expected.to all(include('username' => be_a(String)))
end
# Changing this spec means that the reviewer roulette part of GitLab's Danger
# integration will also need to change
it 'represents dmitriy correctly' do
dmitriy = json_response[0]
expect(dmitriy).to include(
'username' => 'dzaporozhets',
'name' => "Dmitriy 'DZ' Zaporozhets",
'projects' => include(
'gitlab-ce' => 'maintainer backend',
'gitlab-ee' => 'maintainer backend'
)
)
end
end
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