diaspora/spec/controllers/jasmine_fixtures/contacts_spec.rb
Dennis Schubert 862fa38f8b
Remove the JSXC/Prosody integration.
As per discussion on https://discourse.diasporafoundation.org/t/removing-diaspora-s-current-chat-integration/2718, nobody raised serious concerns or objections. Given future plans, we do not think having an unfinished implementation of something that likely will not get finished in the current form is worth it. So let's get rid of it.
2019-10-18 23:14:14 +02:00

36 lines
1.2 KiB
Ruby

# frozen_string_literal: true
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
describe ContactsController, :type => :controller do
describe '#index' do
before do
@aspect = bob.aspects.create(:name => "another aspect")
bob.share_with alice.person, @aspect
bob.share_with eve.person, @aspect
sign_in bob, scope: :user
end
it "generates the aspects_manage fixture", :fixture => true do
get :index, params: {a_id: @aspect.id}
save_fixture(html_for("body"), "aspects_manage")
end
it "generates the aspects_manage_contacts_json fixture", fixture: true do
# adds one not mutual contact
bob.share_with(FactoryGirl.create(:person), @aspect)
get :index, params: {a_id: @aspect.id, page: "1"}, format: :json
save_fixture(response.body, "aspects_manage_contacts_json")
end
it "generates the contacts_json fixture", :fixture => true do
json = bob.contacts.map { |c|
ContactPresenter.new(c, bob).full_hash_with_person
}.to_json
save_fixture(json, "contacts_json")
end
end
end