diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index c83169ea6..4ce9c5ff2 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -99,7 +99,7 @@ Information about affiliations """ type Affiliation { """ - Affiliation ROR identifier + Affiliation identifier """ id: ID @@ -1421,7 +1421,7 @@ type Creator { """ The organizational or institutional affiliation of the creator. """ - affiliation: [Organization!] + affiliation: [Affiliation!] """ Family name. In the U.S., the last name of an Person. diff --git a/app/graphql/types/affiliation_type.rb b/app/graphql/types/affiliation_type.rb index db6d7c255..47b56a698 100644 --- a/app/graphql/types/affiliation_type.rb +++ b/app/graphql/types/affiliation_type.rb @@ -3,6 +3,6 @@ class AffiliationType < BaseObject description "Information about affiliations" - field :id, ID, null: true, description: "Affiliation ROR identifier" + field :id, ID, null: true, description: "Affiliation identifier" field :name, String, null: false, description: "Affiliation name" end diff --git a/app/graphql/types/creator_type.rb b/app/graphql/types/creator_type.rb index 3625af1ad..77704cdb5 100644 --- a/app/graphql/types/creator_type.rb +++ b/app/graphql/types/creator_type.rb @@ -8,7 +8,7 @@ class CreatorType < BaseObject field :name, String, null: true, description: "The name of the creator." field :given_name, String, null: true, description: "Given name. In the U.S., the first name of a Person." field :family_name, String, null: true, description: "Family name. In the U.S., the last name of an Person." - field :affiliation, [OrganizationType], null: true, description: "The organizational or institutional affiliation of the creator." + field :affiliation, [AffiliationType], null: true, description: "The organizational or institutional affiliation of the creator." def type object.name_type == "Organizational" ? "Organization" : "Person" diff --git a/app/models/concerns/mailable.rb b/app/models/concerns/mailable.rb index 63b295360..6c2a456f0 100644 --- a/app/models/concerns/mailable.rb +++ b/app/models/concerns/mailable.rb @@ -34,7 +34,6 @@ def send_welcome_email(responsible_id: nil) html = User.format_message_html(template: "users/welcome.html.erb", title: title, contact_name: name, name: symbol, url: url, reset_url: reset_url) response = User.send_message(name: name, email: system_email, subject: subject, text: text, html: html) - fields = [ { title: "Account ID", value: symbol, short: true }, { title: "Account type", value: account_type, short: true }, diff --git a/spec/graphql/types/creator_type_spec.rb b/spec/graphql/types/creator_type_spec.rb index 1294ee743..d2659ed16 100644 --- a/spec/graphql/types/creator_type_spec.rb +++ b/spec/graphql/types/creator_type_spec.rb @@ -9,6 +9,6 @@ it { is_expected.to have_field(:name).of_type("String") } it { is_expected.to have_field(:givenName).of_type("String") } it { is_expected.to have_field(:familyName).of_type("String") } - it { is_expected.to have_field(:affiliation).of_type("[Organization!]") } + it { is_expected.to have_field(:affiliation).of_type("[Affiliation!]") } end end diff --git a/spec/graphql/types/dataset_type_spec.rb b/spec/graphql/types/dataset_type_spec.rb index 445a4dcb1..b045ef760 100644 --- a/spec/graphql/types/dataset_type_spec.rb +++ b/spec/graphql/types/dataset_type_spec.rb @@ -279,8 +279,6 @@ expect(response.dig("data", "datasets", "nodes").length).to eq(2) expect(response.dig("data", "datasets", "nodes", 0, "viewCount")).to be > 1 expect(response.dig("data", "datasets", "nodes", 0, "viewsOverTime").length).to be >= 1 - puts "dfkhjfgdjhkfgdjhk" - puts response.dig("data", "datasets", "nodes", 0, "viewsOverTime") expect(response.dig("data", "datasets", "nodes", 0, "viewsOverTime").first.dig('yearMonth')).not_to be_nil # expect(response.dig("data", "datasets", "nodes", 0, "citations", "totalCount")).to eq(2) # expect(response.dig("data", "datasets", "nodes", 0, "citations", "nodes").length).to eq(2) diff --git a/spec/requests/events_spec.rb b/spec/requests/events_spec.rb index 5e5c8d0cf..d461a5b87 100644 --- a/spec/requests/events_spec.rb +++ b/spec/requests/events_spec.rb @@ -284,11 +284,8 @@ it "are correctly stored" do post uri, params, headers - expect(last_response.status).to eq(201) - puts json.dig("data", "id") event = Event.where(uuid: json.dig("data", "id")).first - puts event.inspect expect(event[:obj].has_key?('datePublished')).to be_truthy expect(event[:obj].has_key?('registrantId')).to be_truthy expect(event[:obj].has_key?('proxyIdentifiers')).to be_truthy diff --git a/spec/requests/exports_spec.rb b/spec/requests/exports_spec.rb index b8e6d93b3..2c00ff564 100644 --- a/spec/requests/exports_spec.rb +++ b/spec/requests/exports_spec.rb @@ -48,7 +48,6 @@ it 'returns repositories', vcr: false do get "/export/repositories", nil, admin_headers - puts last_response.body expect(last_response.status).to eq(200) csv = last_response.body.lines expect(csv.length).to eq(2) diff --git a/spec/requests/media_spec.rb b/spec/requests/media_spec.rb index 1c95c4fac..fc01beb82 100644 --- a/spec/requests/media_spec.rb +++ b/spec/requests/media_spec.rb @@ -15,7 +15,6 @@ it 'returns media' do get "/dois/#{doi.doi}/media", nil, headers - puts last_response.body expect(last_response.status).to eq(200) expect(json).not_to be_empty expect(json['data'].size).to eq(6)