<commit_before>module DiasporaFederation
  describe Entities::EventParticipation do
    let(:parent) { FactoryGirl.create(:event, author: bob) }
    let(:parent_entity) { FactoryGirl.build(:related_entity, author: bob.diaspora_id) }
    let(:data) {
      add_signatures(
        FactoryGirl.build(
          :event_participation_entity,
          author:      alice.diaspora_id,
          parent_guid: parent.guid,
          parent:      parent_entity
        )
      )
    }

    let(:xml) { <<-XML }
<event_participation>
  <author>#{data[:author]}</author>
  <guid>#{data[:guid]}</guid>
  <parent_guid>#{parent.guid}</parent_guid>
  <status>#{data[:status]}</status>
  <author_signature>#{data[:author_signature]}</author_signature>
  <parent_author_signature>#{data[:parent_author_signature]}</parent_author_signature>
</event_participation>
XML

    let(:string) { "EventParticipation:#{data[:guid]}:#{parent.guid}" }

    it_behaves_like "an Entity subclass"

    it_behaves_like "an XML Entity"

    it_behaves_like "a relayable Entity"
  end
end<commit_msg>Fix event participation spec after #48<commit_after>module DiasporaFederation
  describe Entities::EventParticipation do
    let(:parent) { FactoryGirl.create(:event, author: bob) }
    let(:parent_entity) { FactoryGirl.build(:related_entity, author: bob.diaspora_id) }
    let(:data) {
      FactoryGirl.attributes_for(
        :event_participation_entity,
        author:      alice.diaspora_id,
        parent_guid: parent.guid,
        parent:      parent_entity
      ).tap {|hash| add_signatures(hash) }
    }

    let(:xml) { <<-XML }
<event_participation>
  <author>#{data[:author]}</author>
  <guid>#{data[:guid]}</guid>
  <parent_guid>#{parent.guid}</parent_guid>
  <status>#{data[:status]}</status>
  <author_signature>#{data[:author_signature]}</author_signature>
  <parent_author_signature>#{data[:parent_author_signature]}</parent_author_signature>
</event_participation>
XML

    let(:string) { "EventParticipation:#{data[:guid]}:#{parent.guid}" }

    it_behaves_like "an Entity subclass"

    it_behaves_like "an XML Entity"

    it_behaves_like "a relayable Entity"
  end
end
{'fraction_non_alphanumeric': 0.14080592867068087, 'fraction_numerical': 0.0009263547938860583, 'mean_word_length': 4.294117647058823, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6021840', 'n_tokens_mistral': 734, 'n_tokens_neox': 703, 'n_words': 106}