|
15 | 15 | expected_errors = [ |
16 | 16 | 'header: FFT__a-1 No files found for value', |
17 | 17 | 'header: FFT__a URL: invalid_url inaccessible', |
18 | | - 'header: FFT__a URL: invalid_url invalid. needs to be .jpg, .pdf, .mp3 or .mp4', |
| 18 | + 'header: FFT__a URL: invalid_url invalid. needs to be .jpg, .pdf, .mp3, .mp4 or .mov', |
19 | 19 | 'header: 500__3 There is a 500__3 without a corresponding 500__a. Value for 500__3 is value', |
20 | 20 | 'header: 800__6 There is no matching $6 for value value' |
21 | 21 | ] |
|
30 | 30 | allow(described_class).to receive(:fft_valid_format?).with('invalid_url').and_return(false) |
31 | 31 | described_class.send(:validate_fft, 'FFT__a', 'invalid_url', errors) |
32 | 32 | expect(errors).to include('header: FFT__a URL: invalid_url inaccessible') |
33 | | - expect(errors).to include('header: FFT__a URL: invalid_url invalid. needs to be .jpg, .pdf, .mp3 or .mp4') |
| 33 | + expect(errors).to include('header: FFT__a URL: invalid_url invalid. needs to be .jpg, .pdf, .mp3, .mp4 or .mov') |
34 | 34 | end |
35 | 35 | end |
36 | 36 |
|
|
79 | 79 | expect(described_class.send(:fft_valid_format?, url)).to be true |
80 | 80 | end |
81 | 81 |
|
82 | | - it 'returns false for a URL not ending with .jpg, .pdf, .mp3, .mp4' do |
| 82 | + it 'returns false for a URL not ending with .jpg, .pdf, .mp3, .mp4, .mov' do |
83 | 83 | url = 'https://example.com/document.txt' |
84 | 84 | expect(described_class.send(:fft_valid_format?, url)).to be false |
85 | 85 | end |
|
93 | 93 | url = 'https://example.com/song.mp4' |
94 | 94 | expect(described_class.send(:fft_valid_format?, url)).to be true |
95 | 95 | end |
| 96 | + |
| 97 | + it 'returns true for a URL ending with .mov' do |
| 98 | + url = 'https://example.com/video.mov' |
| 99 | + expect(described_class.send(:fft_valid_format?, url)).to be true |
| 100 | + end |
96 | 101 | end |
97 | 102 |
|
98 | 103 | describe '.valid_500__3?' do |
|
0 commit comments