mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 11:48:06 +01:00
24 lines
545 B
Ruby
24 lines
545 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require 'rails_helper'
|
||
|
|
||
|
RSpec.describe StatusTrend do
|
||
|
describe 'Associations' do
|
||
|
it { is_expected.to belong_to(:account).required }
|
||
|
it { is_expected.to belong_to(:status).required }
|
||
|
end
|
||
|
|
||
|
describe '.locales' do
|
||
|
before do
|
||
|
Fabricate :status_trend, language: 'en'
|
||
|
Fabricate :status_trend, language: 'en'
|
||
|
Fabricate :status_trend, language: 'es'
|
||
|
end
|
||
|
|
||
|
it 'returns unique set of languages' do
|
||
|
expect(described_class.locales)
|
||
|
.to eq(['en', 'es'])
|
||
|
end
|
||
|
end
|
||
|
end
|