1
0

media_spec.rb 578 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Media' do
  4. describe 'Player page' do
  5. context 'when signed in' do
  6. before { sign_in Fabricate(:user) }
  7. it 'visits the media player page and renders the media' do
  8. status = Fabricate :status
  9. media = Fabricate :media_attachment, type: :video
  10. status.media_attachments << media
  11. visit medium_player_path(media)
  12. expect(page)
  13. .to have_css('body', class: 'player')
  14. .and have_css('div[data-component="Video"]')
  15. end
  16. end
  17. end
  18. end