Skip to content

Commit

Permalink
correct PUBLICATION_DOI Env variable. #339
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 13, 2015
1 parent f1d314d commit 0c94196
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/data_exports/zenodo_data_export.rb
@@ -1,10 +1,11 @@
class ZenodoDataExport < ::DataExport
class MissingZenodoApiKey < Error ; end

PUBLICATION_DOI = "10.3789/isqv25no2.2013.04"

module ZenodoClientFactory
API_KEY_ENV_VARIABLE_NAME = "ZENODO_KEY"
URL_ENV_VARIABLE_NAME = "ZENODO_URL"
PUBLICATION_DOI = "10.3789/isqv25no2.2013.04"

def self.build(options={})
api_key = options[:api_key] || ENV[API_KEY_ENV_VARIABLE_NAME]
Expand Down
6 changes: 6 additions & 0 deletions spec/models/data_exports/zenodo_data_export_spec.rb
Expand Up @@ -239,6 +239,12 @@
)
end

it "has an attribute to a related publication" do
expect(metadata["related_identifiers"]).to include(
{ "relation" => "isSupplementTo", "identifier" => "10.3789/isqv25no2.2013.04" }
)
end

context "and there was a previous export with the same name" do
subject(:data_export){ FactoryGirl.build(:zenodo_data_export, name: previous_export.name) }

Expand Down

0 comments on commit 0c94196

Please sign in to comment.