Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
fc2eda7adf
3 changed files with 48 additions and 47 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -19,3 +19,4 @@ gpg/*/random_seed
|
||||||
public/uploads/*
|
public/uploads/*
|
||||||
public/source.tar
|
public/source.tar
|
||||||
tmp/**/*
|
tmp/**/*
|
||||||
|
capybara-*.html
|
||||||
4
lib/tasks/ci.rake
Normal file
4
lib/tasks/ci.rake
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
desc "Run all specs and features"
|
||||||
|
task :ci => [:environment] do
|
||||||
|
system "bundle exec rake"
|
||||||
|
end
|
||||||
|
|
@ -45,12 +45,13 @@ describe User do
|
||||||
Request.count.should == 0
|
Request.count.should == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not be able to friend request an existing friend' do friend = Factory.create(:person)
|
it 'should not be able to friend request an existing friend' do
|
||||||
|
friend = Factory.create(:person)
|
||||||
|
|
||||||
@user.friends << friend
|
@user.friends << friend
|
||||||
@user.save
|
@user.save
|
||||||
|
|
||||||
proc {@user.send_friend_request_to( friend, @aspect)}.should raise_error
|
proc { @user.send_friend_request_to(friend, @aspect) }.should raise_error
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'multiple users accepting/rejecting the same person' do
|
describe 'multiple users accepting/rejecting the same person' do
|
||||||
|
|
@ -133,7 +134,7 @@ describe User do
|
||||||
|
|
||||||
@user2.receive @req_two_xml
|
@user2.receive @req_two_xml
|
||||||
@user2.pending_requests.size.should be 1
|
@user2.pending_requests.size.should be 1
|
||||||
@user2.ignore_friend_request @user2.pending_requests.first.id#@request_two.id
|
@user2.ignore_friend_request @user2.pending_requests.first.id #@request_two.id
|
||||||
@user2.friends.include?(@person_one).should be false
|
@user2.friends.include?(@person_one).should be false
|
||||||
Person.all.count.should be 3
|
Person.all.count.should be 3
|
||||||
end
|
end
|
||||||
|
|
@ -209,19 +210,14 @@ describe User do
|
||||||
@user2.receive @message.to_diaspora_xml.to_s
|
@user2.receive @message.to_diaspora_xml.to_s
|
||||||
@user2.unfriend @user.person
|
@user2.unfriend @user.person
|
||||||
@user.unfriended_by @user2.person
|
@user.unfriended_by @user2.person
|
||||||
@aspect.reload
|
|
||||||
@aspect2.reload
|
|
||||||
@user.reload
|
|
||||||
@user2.reload
|
|
||||||
end
|
end
|
||||||
it "deletes the unfriended user's posts from visible_posts" do
|
it "deletes the unfriended user's posts from visible_posts" do
|
||||||
@user.raw_visible_posts.include?(@message.id).should be_false
|
@user.raw_visible_posts(true).include?(@message.id).should be_false
|
||||||
end
|
end
|
||||||
it "deletes the unfriended user's posts from the aspect's posts" do
|
it "deletes the unfriended user's posts from the aspect's posts" do
|
||||||
@aspect2.posts.include?(@message).should be_false
|
@aspect2.posts(true).include?(@message).should be_false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue