2018-06-05 07:15:48 +00:00
|
|
|
require 'rails_helper'
|
2018-07-05 15:43:52 +00:00
|
|
|
require 'models/concerns/can_lookup_examples'
|
2018-06-05 07:15:48 +00:00
|
|
|
|
|
|
|
RSpec.describe Organization do
|
2018-07-05 13:24:26 +00:00
|
|
|
include_examples 'CanLookup'
|
2018-06-05 07:15:48 +00:00
|
|
|
|
|
|
|
context '.where_or_cis' do
|
|
|
|
|
|
|
|
it 'finds instance by querying multiple attributes case insensitive' do
|
|
|
|
# search for Zammad Foundation
|
|
|
|
organizations = described_class.where_or_cis(%i[name note], '%zammad%')
|
|
|
|
expect(organizations).not_to be_blank
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|