Sha256: fdb2fcb9591c345998535c29aede39bc9c987bd6a3ab9fd4ca1836525aa6e8c8
Contents?: true
Size: 991 Bytes
Versions: 1
Compression:
Stored size: 991 Bytes
Contents
require 'spec_helper' describe Applicants::Video do it { should belong_to :applicant } it { should have_db_column :filename } it { should have_db_column :video_url } it { should have_db_column :video_url_ssl } it { should_not have_db_column :data_center } let(:url) { "http://ut-applicant-videos.s3-us-west-1.amazonaws.com/file.mp4?expiring=info&X-stuff=99" } let(:video) { Applicants::Video.new video_url: url } describe "#temporary_video_url" do it "will return a video url with fresh expiry" do expect(video.temporary_video_url).to_not include('expiring=info') expect(video.temporary_video_url).to include('=3600') end end describe "#remove_video!" do let(:video_url_utility) { double Applicants::VideoUrlUtility } it "removes a video" do expect(Applicants::VideoUrlUtility).to receive(:new).with(url).and_return video_url_utility expect(video_url_utility).to receive :remove! video.remove_video! end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
applicants-0.11.0 | spec/models/applicants/video_spec.rb |