Sha256: 3f2e1c814885e77d2c15c3a85be09fc3e97614c8c11bbebda68b9c03b3c81dfc
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
require File.expand_path('../../../../../helper', __FILE__) describe('Ramaze::Helper::Section') do behaves_like :capybara status_id = Sections::Model::SectionEntryStatus[:name => 'published'].id user_id = Users::Model::User[:email => 'spec@domain.tld'].id section = Sections::Model::Section.create( :name => 'Spec section', :comment_allow => false, :comment_require_account => false, :comment_moderate => false, :comment_format => 'markdown' ) entry = Sections::Model::SectionEntry.create( :title => 'Spec entry', :user_id => user_id, :section_entry_status_id => status_id, :section_id => section.id ) it('Validate a valid section') do url = Sections::Controller::Sections.r(:edit, section.id).to_s visit(url) current_path.should == url end it('Validate an invalid section') do url = Sections::Controller::Sections.r(:edit, section.id + 1).to_s index = Sections::Controller::Sections.r(:index).to_s visit(url) current_path.should == index end it('Validate a valid section entry') do url = Sections::Controller::SectionEntries.r( :edit, section.id, entry.id ).to_s visit(url) current_path.should == url end it('Validate an invalid section entry') do index = Sections::Controller::SectionEntries.r(:index, section.id).to_s url = Sections::Controller::SectionEntries.r( :edit, section.id, entry.id + 1 ).to_s visit(url) current_path.should == index end entry.destroy section.destroy end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
zen-0.3 | spec/zen/package/sections/helper/section.rb |
zen-0.3b1 | spec/zen/package/sections/helper/section.rb |
zen-0.3b | spec/zen/package/sections/helper/section.rb |