Fixed store serialization
Change-Id: I0a17e9f059d28788c8a2726c5c12eaf0bad18e6c
diff --git a/lib/KorAP/XML/Krill.pm b/lib/KorAP/XML/Krill.pm
index 780f84f..8c546d0 100644
--- a/lib/KorAP/XML/Krill.pm
+++ b/lib/KorAP/XML/Krill.pm
@@ -655,7 +655,7 @@
my %hash;
- foreach (@ATTR, @ADVANCED_ATTR) {
+ foreach (@ATTR, @ADVANCED_ATTR, 'store') {
if (my $att = $self->$_) {
$att =~ s/\n/ /g;
$att =~ s/\s\s+/ /g;
diff --git a/t/sgbr/sgbr_meta.t b/t/sgbr/sgbr_meta.t
index 53a096f..ed64fa2 100644
--- a/t/sgbr/sgbr_meta.t
+++ b/t/sgbr/sgbr_meta.t
@@ -59,6 +59,10 @@
ok(!$doc->corpus_editor, 'Corpus: editor');
ok(!$doc->corpus_author, 'Corpus: author');
+my $hash = $doc->to_hash;
+is($hash->{title}, 'Sommerüberraschung', 'Corpus title');
+is($hash->{store}->{sgbrAuthorSex}, 'M', 'store');
+
done_testing;