Loading lib/labkit/fields.rb +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ module Labkit # to identify and track usage of deprecated fields in the codebase. MAPPINGS = { Fields::GL_USER_ID => ["meta.user_id"], Fields::GL_USER_ID => ["user_id", "userid"], }.freeze class << self Loading spec/labkit/fields_spec.rb +3 −3 Original line number Diff line number Diff line Loading @@ -19,13 +19,13 @@ RSpec.describe Labkit::Fields do end it 'maps deprecated fields to their standard equivalents' do expect(described_class.all['meta.user_id']).to eq(Labkit::Fields::GL_USER_ID) expect(described_class.all['user_id']).to eq(Labkit::Fields::GL_USER_ID) end end describe '.deprecated?' do it 'returns true for a known deprecated field' do result = described_class.deprecated?('meta.user_id') result = described_class.deprecated?('user_id') expect(result).to be(true) end Loading @@ -37,7 +37,7 @@ RSpec.describe Labkit::Fields do describe '.standard_field_for' do it 'returns a standard field for a known deprecated field' do result = described_class.standard_field_for('meta.user_id') result = described_class.standard_field_for('user_id') expect(result).to be(Labkit::Fields::GL_USER_ID) end end Loading Loading
lib/labkit/fields.rb +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ module Labkit # to identify and track usage of deprecated fields in the codebase. MAPPINGS = { Fields::GL_USER_ID => ["meta.user_id"], Fields::GL_USER_ID => ["user_id", "userid"], }.freeze class << self Loading
spec/labkit/fields_spec.rb +3 −3 Original line number Diff line number Diff line Loading @@ -19,13 +19,13 @@ RSpec.describe Labkit::Fields do end it 'maps deprecated fields to their standard equivalents' do expect(described_class.all['meta.user_id']).to eq(Labkit::Fields::GL_USER_ID) expect(described_class.all['user_id']).to eq(Labkit::Fields::GL_USER_ID) end end describe '.deprecated?' do it 'returns true for a known deprecated field' do result = described_class.deprecated?('meta.user_id') result = described_class.deprecated?('user_id') expect(result).to be(true) end Loading @@ -37,7 +37,7 @@ RSpec.describe Labkit::Fields do describe '.standard_field_for' do it 'returns a standard field for a known deprecated field' do result = described_class.standard_field_for('meta.user_id') result = described_class.standard_field_for('user_id') expect(result).to be(Labkit::Fields::GL_USER_ID) end end Loading