Sha256: 6ad4b6bcd591fb8733b1647bd357c6121932c9a27861a2c25855167426ec8dc0
Contents?: true
Size: 658 Bytes
Versions: 8
Compression:
Stored size: 658 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe 'Migrating from old versions' do it 'sets ns' do coll = ThecoreSettings::Setting.collection if coll.respond_to?(:insert_one) coll.insert_one({enabled: true, key: 'test', raw: '9060000000', type: 'phone'}) else coll.insert({enabled: true, key: 'test', raw: '9060000000', type: 'phone'}) end ThecoreSettings.migrate! expect(ThecoreSettings::Setting.first.key).to eq 'test' expect(ThecoreSettings::Setting.first.raw).to eq '9060000000' expect(ThecoreSettings::Setting.first.ns).to eq 'main' expect(ThecoreSettings::Setting.first.kind).to eq 'phone' end end
Version data entries
8 entries across 8 versions & 1 rubygems