Sha256: 26709c9324dc3a19407727ebe0d0deb87298035c6550285bf8d66d7a24a9d154

Contents?: true

Size: 640 Bytes

Versions: 5

Compression:

Stored size: 640 Bytes

Contents

require 'active_record/spec_helper'

require_all File.dirname(__FILE__) + "/../shared/" 

describe 'Scenario: users - :guest, :user, :admin' do
  context 'User having both user and editor roles (normal user)' do
    before(:each) do
      @user = User.create!(:role => "user, editor")
    end

    it_should_behave_like "User + Editor roles" do
      let(:current_user) { @user }
      let(:user) { current_user_ability(:user) }
      let(:own_article) { Article.create!(:user_id => @user.id) }
      let(:own_post)    { Post.create(:user_id => @user.id) }
      let(:own_comment) { Comment.create(:user_id => @user.id) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb
cantango-0.9.4.6 spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb
cantango-0.9.4.5 spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb
cantango-0.9.4.3 spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb
cantango-0.9.4.2 spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb