Sha256: 81dd6d456d3d7b5d6d4a80a7652203abfd68dcb808c9ddb6ec4257c85de4bb16
Contents?: true
Size: 1.36 KB
Versions: 31
Compression:
Stored size: 1.36 KB
Contents
require 'spec_helper' describe ACTV::AssetFactory do let(:category_name) { "" } let(:category_taxonomy) { "" } let(:response) { {assetGuid: "111", assetCategories: [{category: {categoryName: category_name, categoryTaxonomy: category_taxonomy}}]} } subject(:asset) { ACTV::AssetFactory.new(response).asset } describe '#asset' do context 'the response is not an author, event or article' do it { should be_a ACTV::Asset } end context 'the response has an article category' do let(:category_name) { "Articles" } it { should be_a ACTV::Article } end context 'the response has an article taxonomy' do let(:category_taxonomy) { "Running/Articles" } it { should be_a ACTV::Article } end context 'the response has an event category' do let(:category_name) { "Event" } it { should be_a ACTV::Event } end context 'the response has an event taxonomy' do let(:category_taxonomy) { "Race/Event" } it { should be_a ACTV::Event } end context 'the response has an author category' do let(:category_name) { "Author" } it { should be_a ACTV::Author } end context 'the response has an author taxonomy' do let(:category_taxonomy) { "Running/Author" } it { should be_a ACTV::Author } end end end
Version data entries
31 entries across 31 versions & 1 rubygems