From 659f0b96d4b486878036a9ec67acd17b497376f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonne=20Ha=C3=9F?= <me@mrzyx.de>
Date: Sun, 1 Sep 2013 14:12:40 +0200
Subject: [PATCH] do not pass relations to a method that expects a set of
 aspects ids or a single aspect

---
 spec/controllers/people_controller_spec.rb | 6 +++---
 spec/integration/mentioning_spec.rb        | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb
index 881c198d8b..bc11af200a 100644
--- a/spec/controllers/people_controller_spec.rb
+++ b/spec/controllers/people_controller_spec.rb
@@ -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
diff --git a/spec/integration/mentioning_spec.rb b/spec/integration/mentioning_spec.rb
index dac2bcc0eb..b3f10af060 100644
--- a/spec/integration/mentioning_spec.rb
+++ b/spec/integration/mentioning_spec.rb
@@ -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)
-- 
GitLab