Sha256: a95cffe3df1b8136947ec895b3f48e28ea45e869713be28b13b37d51e8c2eabf
Contents?: true
Size: 872 Bytes
Versions: 4
Compression:
Stored size: 872 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe PostsController do include SocialStream::TestHelpers::Controllers render_views describe "authorizing" do before do @user = Factory(:user) sign_in @user end describe "posts to user" do before do model_assigned_to @user.sent_ties.received_by(@user).related_by(@user.relations.sort.first).first end it_should_behave_like "Allow Creating" end describe "post to friend" do before do model_assigned_to Factory(:friend, :receiver => @user.actor) end it_should_behave_like "Allow Creating" end describe "post to acquaintance" do before do model_assigned_to Factory(:acquaintance, :receiver => @user.actor) end it_should_behave_like "Deny Creating" end end end
Version data entries
4 entries across 4 versions & 1 rubygems