Add a feature flip for education field update
This commit is contained in:
parent
9b07efa5e9
commit
f91c54725e
|
@ -216,7 +216,10 @@ class Travis::Api::App
|
||||||
def info(attributes = {})
|
def info(attributes = {})
|
||||||
info = data.to_hash.slice('name', 'login', 'gravatar_id')
|
info = data.to_hash.slice('name', 'login', 'gravatar_id')
|
||||||
info.merge! attributes.stringify_keys
|
info.merge! attributes.stringify_keys
|
||||||
|
if Travis::Features.feature_active?(:education_data_sync) ||
|
||||||
|
(user && Travis::Features.owner_active?(:education_data_sync, user))
|
||||||
info['education'] = education
|
info['education'] = education
|
||||||
|
end
|
||||||
info['github_id'] ||= data['id']
|
info['github_id'] ||= data['id']
|
||||||
info
|
info
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,10 @@ require 'spec_helper'
|
||||||
describe Travis::Api::App::Endpoint::Authorization::UserManager do
|
describe Travis::Api::App::Endpoint::Authorization::UserManager do
|
||||||
let(:manager) { described_class.new(data, 'abc123') }
|
let(:manager) { described_class.new(data, 'abc123') }
|
||||||
|
|
||||||
|
before do
|
||||||
|
Travis::Features.enable_for_all(:education_data_sync)
|
||||||
|
end
|
||||||
|
|
||||||
describe '#info' do
|
describe '#info' do
|
||||||
let(:data) {
|
let(:data) {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user