1
0

preview_card_trend_spec.rb 519 B

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