This commit introduces changes to the user data export archive format. This extends data set which is included in the archive. This data can be then imported to other pods when this feature is implemented. Also the commit adds the archive format json schema. ATM it is used in automatic tests only, but in future it will also be used to validate incoming archives.
17 lines
524 B
Ruby
17 lines
524 B
Ruby
describe FederationEntitySerializer do
|
|
class TestEntity < DiasporaFederation::Entity
|
|
property :test, :string
|
|
end
|
|
|
|
let(:object) { double }
|
|
|
|
before do
|
|
# Mock a builder for a TestEntity that we define for this test
|
|
allow(Diaspora::Federation::Mappings).to receive(:builder_for).with(object.class).and_return(:test_entity)
|
|
allow(Diaspora::Federation::Entities).to receive(:test_entity).with(object) {
|
|
TestEntity.new(test: "asdf")
|
|
}
|
|
end
|
|
|
|
it_behaves_like "a federation entity serializer"
|
|
end
|