twitter-status-bot/.gems/gems/twitter-5.11.0/spec/twitter/target_user_spec.rb

24 lines
753 B
Ruby
Raw Normal View History

require 'helper'
describe Twitter::TargetUser do
describe '#==' do
it 'returns true when objects IDs are the same' do
saved_search = Twitter::TargetUser.new(:id => 1, :name => 'foo')
other = Twitter::TargetUser.new(:id => 1, :name => 'bar')
expect(saved_search == other).to be true
end
it 'returns false when objects IDs are different' do
saved_search = Twitter::TargetUser.new(:id => 1)
other = Twitter::TargetUser.new(:id => 2)
expect(saved_search == other).to be false
end
it 'returns false when classes are different' do
saved_search = Twitter::TargetUser.new(:id => 1)
other = Twitter::Identity.new(:id => 1)
expect(saved_search == other).to be false
end
end
end