spec/bullet_spec.rb in bullet-5.7.0 vs spec/bullet_spec.rb in bullet-5.7.1

- old
+ new

@@ -86,30 +86,30 @@ end describe '#add_whitelist' do context "for 'special' class names" do it 'is added to the whitelist successfully' do - Bullet.add_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :department) + Bullet.add_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :department) expect(Bullet.get_whitelist_associations(:n_plus_one_query, 'Klass')).to include :department end end end describe '#delete_whitelist' do context "for 'special' class names" do it 'is deleted from the whitelist successfully' do - Bullet.add_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :department) - Bullet.delete_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :department) + Bullet.add_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :department) + Bullet.delete_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :department) expect(Bullet.whitelist[:n_plus_one_query]).to eq({}) end end context 'when exists multiple definitions' do it 'is deleted from the whitelist successfully' do - Bullet.add_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :department) - Bullet.add_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :team) - Bullet.delete_whitelist(:type => :n_plus_one_query, :class_name => 'Klass', :association => :team) + Bullet.add_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :department) + Bullet.add_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :team) + Bullet.delete_whitelist(type: :n_plus_one_query, class_name: 'Klass', association: :team) expect(Bullet.get_whitelist_associations(:n_plus_one_query, 'Klass')).to include :department expect(Bullet.get_whitelist_associations(:n_plus_one_query, 'Klass')).to_not include :team end end end @@ -125,10 +125,10 @@ context 'when called with Rack environment hash' do let(:env) { { 'REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/path', - 'QUERY_STRING' => 'foo=bar', + 'QUERY_STRING' => 'foo=bar' } } context "when env['REQUEST_URI'] is nil" do before { env['REQUEST_URI'] = nil }