2023-02-22 11:55:31 +11:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-13 03:09:21 +10:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Conversation, type: :model do
|
2019-07-29 01:47:37 +10:00
|
|
|
describe '#local?' do
|
|
|
|
it 'returns true when URI is nil' do
|
|
|
|
expect(Fabricate(:conversation).local?).to be true
|
|
|
|
end
|
2017-05-13 03:09:21 +10:00
|
|
|
|
2019-07-29 01:47:37 +10:00
|
|
|
it 'returns false when URI is not nil' do
|
|
|
|
expect(Fabricate(:conversation, uri: 'abc').local?).to be false
|
|
|
|
end
|
|
|
|
end
|
2017-05-13 03:09:21 +10:00
|
|
|
end
|