spec/mongo/protocol/query_spec.rb in mongo-2.15.0.alpha vs spec/mongo/protocol/query_spec.rb in mongo-2.15.0

- old
+ new

@@ -1,5 +1,8 @@ +# frozen_string_literal: true +# encoding: utf-8 + require 'lite_spec_helper' require 'support/shared/protocol' describe Mongo::Protocol::Query do @@ -25,11 +28,11 @@ end context 'when options are provided' do context 'when flags are provided' do - let(:options) { { :flags => [:slave_ok] } } + let(:options) { { :flags => [:secondary_ok] } } it 'sets the flags' do expect(message.flags).to eq(options[:flags]) end end @@ -164,11 +167,11 @@ expect(field).to be_int32(2) end end context 'slave ok flag' do - let(:flags) { [:slave_ok] } + let(:flags) { [:secondary_ok] } it 'sets the third bit' do expect(field).to be_int32(4) end end @@ -206,10 +209,10 @@ expect(field).to be_int32(128) end end context 'multiple flags' do - let(:flags) { [:await_data, :slave_ok] } + let(:flags) { [:await_data, :secondary_ok] } it 'sets the correct bits' do expect(field).to be_int32(36) end end end