require File.dirname(__FILE__) + "/../../../spec_helper"
#
# Test for Shop Line Item Tags
#
describe Shop::Tags::Card do
dataset :pages
before :all do
@page = pages(:home)
end
it 'should describe these tags' do
Shop::Tags::Card.tags.sort.should == [
'form:card',
'form:card:type',
'form:card:month',
'form:card:year'].sort
end
describe 'form:card:type' do
context 'all cards' do
it 'should output the card types' do
tag = %{}
exp = %{}
@page.should render(tag).as(exp)
end
end
context 'except amex and diners' do
it 'should output all except amex and diners' do
tag = %{}
exp = %{}
@page.should render(tag).as(exp)
end
end
context 'only amex and diners' do
it 'should output all except amex' do
tag = %{}
exp = %{}
@page.should render(tag).as(exp)
end
end
end
describe 'form:card:month' do
it 'should output the card months' do
tag = %{}
exp = %{}
@page.should render(tag).as(exp)
end
end
describe 'form:card:year' do
it 'should output the card years' do
tag = %{}
exp = %{}
@page.should render(tag).as(exp)
end
end
end