status_trend_spec.rb 545 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe StatusTrend do
  4. describe 'Associations' do
  5. it { is_expected.to belong_to(:account).required }
  6. it { is_expected.to belong_to(:status).required }
  7. end
  8. describe '.locales' do
  9. before do
  10. Fabricate :status_trend, language: 'en'
  11. Fabricate :status_trend, language: 'en'
  12. Fabricate :status_trend, language: 'es'
  13. end
  14. it 'returns unique set of languages' do
  15. expect(described_class.locales)
  16. .to eq(['en', 'es'])
  17. end
  18. end
  19. end