Sha256: 5f7d954b5e524c27f2b4e0e0247e9302e753cd56ca0c52b7112e1e757296ca9d
Contents?: true
Size: 1.25 KB
Versions: 17
Compression:
Stored size: 1.25 KB
Contents
# coding: utf-8 require 'spec_helper' describe Article do context "TEXT" do let(:article) { create(:text_article) } it "have valid number of text blocks from page" do expect(article.page.content_blocks.count).to eq 1 expect(article.page.content_blocks.first.class.name).to eq "Redditor::TextBlock" end end # context "TEXT" context "SLIDER" do let(:article) { create(:slider_article) } it "have valid number of slider blocks from page" do expect(article.page.content_blocks.count).to eq 1 expect(article.page.content_blocks.first.images.count).to eq 3 end end # context "SLIDER" context "VIDEO" do let(:article) { create(:video_article) } it "have valid number of video blocks from page" do expect(article.page.content_blocks.count).to eq 1 expect(article.page.content_blocks.first.class.name).to eq "Redditor::VideoBlock" end end # context "VIDEO" context "FULL" do let(:article) { create(:full_article) } it "have valid number of blocks from page" do expect(article.page.content_blocks.first.position).to eq 1 expect(article.page.content_blocks.last.position).to eq 3 expect(article.page.content_blocks.count).to eq 3 end end # context "VIDEO" end
Version data entries
17 entries across 17 versions & 1 rubygems