blinkbox_films 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blinkbox_films/film_page.rb +1 -1
- data/spec/feature/film_page_spec.rb +24 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b58c31c4a27f0b5f3a70f26d6abe023cb5b9b7c
|
4
|
+
data.tar.gz: 80f1bf1a25df6676237227295ec73a795fa567ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9b610bddea333b49dd807d8c25d2f1a18044342ca9b39cc57e87a4d287c662a776bda2025a8a8d47eff87d8b8239b7fc1aa651be856c1ee914d77a73d9433c7
|
7
|
+
data.tar.gz: 615e5098620b724d8008afe7c495c3b05abbf76a95525f0ac61d24ed6cf00436312e01024539bcc0c9facf9450d05241777edcb1a82d8f2fbb7b596b1eb6ef94
|
@@ -2,15 +2,30 @@ require 'spec_helper'
|
|
2
2
|
require 'blinkbox_films'
|
3
3
|
|
4
4
|
describe 'A film page', :vcr do
|
5
|
-
|
5
|
+
context 'A film' do
|
6
|
+
subject { BlinkboxFilms::FilmPage.from_url('http://www.blinkbox.com/movies/the-dark-knight-(28710)').film }
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
it { expect(subject.title).to eq('The Dark Knight') }
|
9
|
+
it { expect(subject.url).to eq('http://www.blinkbox.com/movies/the-dark-knight-(28710)') }
|
10
|
+
it { expect(subject.image_url).to match(%r{http://cdn\d+.blinkboxmedia.com/i/contentasset3/000/028/710/gl0lloqf/v=317/w=215;h=306;rm=Crop;q=85/image.jpg}) }
|
11
|
+
it { expect(subject.release_year).to eq(2008) }
|
12
|
+
it { expect(subject.certificate).to eq('12') }
|
13
|
+
it { expect(subject.running_time_in_minutes).to eq(152) }
|
14
|
+
it { expect(subject.rental_price).to eq('£2.49') }
|
15
|
+
it { expect(subject.buy_price).to eq('£6.99') }
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'A TV show' do
|
19
|
+
subject { BlinkboxFilms::FilmPage.from_url('http://www.blinkbox.com/tv/12-monkeys-(2313)/s01-(3555)').film }
|
20
|
+
|
21
|
+
it { expect(subject.title).to eq('12 Monkeys') }
|
22
|
+
it { expect(subject.url).to eq('http://www.blinkbox.com/tv/12-monkeys-(2313)/s01-(3555)') }
|
23
|
+
it { expect(subject.image_url).to match(%r{http://cdn\d+.blinkboxmedia.com/i/tvseries/000/002/313/yzr3t1rw/v=317/w=215;h=306;rm=Crop;q=85/image.jpg}) }
|
24
|
+
it { expect(subject.release_year).to eq(2015) }
|
25
|
+
it { expect(subject.certificate).to eq('15') }
|
26
|
+
it { expect(subject.running_time_in_minutes).to be_nil }
|
27
|
+
it { expect(subject.rental_price).to be_nil }
|
28
|
+
it { expect(subject.buy_price).to eq('£9.99') }
|
29
|
+
end
|
15
30
|
end
|
16
31
|
|