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 = {})
|
||||
info = data.to_hash.slice('name', 'login', 'gravatar_id')
|
||||
info.merge! attributes.stringify_keys
|
||||
info['education'] = education
|
||||
if Travis::Features.feature_active?(:education_data_sync) ||
|
||||
(user && Travis::Features.owner_active?(:education_data_sync, user))
|
||||
info['education'] = education
|
||||
end
|
||||
info['github_id'] ||= data['id']
|
||||
info
|
||||
end
|
||||
|
|
|
@ -3,6 +3,10 @@ require 'spec_helper'
|
|||
describe Travis::Api::App::Endpoint::Authorization::UserManager do
|
||||
let(:manager) { described_class.new(data, 'abc123') }
|
||||
|
||||
before do
|
||||
Travis::Features.enable_for_all(:education_data_sync)
|
||||
end
|
||||
|
||||
describe '#info' do
|
||||
let(:data) {
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user