Sha256: b58d279abb379c76de8b9d49408b0a10aab0a2e59cedb9b203d6a48658bf919b

Contents?: true

Size: 800 Bytes

Versions: 23

Compression:

Stored size: 800 Bytes

Contents

require 'spec_helper'

feature "WritefullySitesFeature" do 
  fixtures :"writefully/sites"
  fixtures :"writefully/posts"
  fixtures :"writefully/authorships"

  let(:owner) { writefully_authorships(:wf_owner_1) }
  let(:site)  { writefully_sites(:codemy_net) }
  let(:post_1) { writefully_posts(:hash_selector_pattern) }

  before do 
    Writefully::ApplicationController.any_instance.stub(:current_wf_authorship).and_return(owner)
    Writefully::Site.any_instance.stub(:processing_errors).and_return([])
  end

  scenario "should see site in index" do 
    visit sites_path
    page.should have_content site.name
  end

  scenario "should redirected and see posts" do 
    visit site_path(site)
    page.should have_content post_1.title
    current_path.should eq site_posts_path(site)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
writefully-0.7.1 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.12 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.11 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.10 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.9 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.7 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.6 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.5 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.4 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.3 spec/features/writefully/sites_feature_spec.rb
writefully-0.6.2 spec/features/writefully/sites_feature_spec.rb
writefully-0.5.1 spec/features/writefully/sites_feature_spec.rb
writefully-0.5.0 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.10 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.8 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.7 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.6 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.5 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.4 spec/features/writefully/sites_feature_spec.rb
writefully-0.4.2 spec/features/writefully/sites_feature_spec.rb