do not pass relations to a method that expects a set of aspects ids or a single aspect

This commit is contained in:
Jonne Haß 2013-09-01 14:12:40 +02:00
parent 76c6d95a0e
commit 659f0b96d4
2 changed files with 4 additions and 4 deletions

View file

@ -263,7 +263,7 @@ describe PeopleController do
end
it "posts include reshares" do
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspects)
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspect_ids)
get :show, :id => @user.person.to_param
assigns[:stream].posts.map { |x| x.id }.should include(reshare.id)
end
@ -319,7 +319,7 @@ describe PeopleController do
end
it "posts include reshares" do
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspects)
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspect_ids)
get :show, :id => @user.person.to_param
assigns[:stream].posts.map { |x| x.id }.should include(reshare.id)
end
@ -361,7 +361,7 @@ describe PeopleController do
end
it "posts include reshares" do
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspects)
reshare = @user.post(:reshare, :public => true, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => alice.aspect_ids)
get :show, :id => @user.person.to_param
assigns[:stream].posts.map { |x| x.id }.should include(reshare.id)
end

View file

@ -3,7 +3,7 @@ require 'spec_helper'
module MentioningSpecHelpers
def default_aspect
@user1.aspects.where(name: 'generic')
@user1.aspects.where(name: 'generic').first
end
def text_mentioning(user)