- Removed posts and non contacts from other's data - Collections are exported in batches to lower memory footprint - In base exporters create User object instead of keeping instance because it caches all associations closes #7627
17 lines
584 B
Ruby
17 lines
584 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe Diaspora::Exporter do
|
|
describe "#execute" do
|
|
it "calls exporters and forms JSON" do
|
|
expect_any_instance_of(Export::UserSerializer).to receive(:as_json).and_return(user: "user_data")
|
|
expect_any_instance_of(Export::OthersDataSerializer).to receive(:as_json).and_return(others_date: "others_data")
|
|
|
|
json = Diaspora::Exporter.new(FactoryGirl.create(:user)).execute
|
|
expect(json).to include_json(
|
|
version: "2.0",
|
|
user: "user_data",
|
|
others_date: "others_data"
|
|
)
|
|
end
|
|
end
|
|
end
|