Skip to content

Commit

Permalink
add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Sep 28, 2023
1 parent b2e9a3f commit 3f769b7
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 16 deletions.
8 changes: 4 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
# load ENV variables from container environment if json file exists
# see https://github.com/phusion/baseimage-docker#envvar_dumps
env_json_file = "/etc/container_environment.json"
if File.exist?(env_json_file)
env_vars = JSON.parse(File.read(env_json_file))
env_vars.each { |k, v| ENV[k] = v }
end
# if File.exist?(env_json_file)
# env_vars = JSON.parse(File.read(env_json_file))
# env_vars.each { |k, v| ENV[k] = v }
# end

# default values for some ENV variables
ENV["APPLICATION"] ||= "client-api"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions spec/graphql/types/person_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -602,36 +602,31 @@

describe "query people with absolute orcid uri", elasticsearch: true, vcr: true do
let(:query) do
"query {
people(query: \"https://orcid.org/0000-0001-5727-2427\", first: 50, after: \"NA\") {
"query asdfsadfa {
people(first: 25, query: \"https://orcid.org/0000-0001-5727-2427\", after: null) {
totalCount
pageInfo {
endCursor
hasNextPage
__typename
}
nodes {
id
name
givenNamerails
givenName
familyName
alternateName
works {
totalCount
published {
id
title
count
}
}
__typename
}
__typename
}
}"
end

it "returns success response" do
response = LupoSchema.execute(query).as_json

expect(response.status).to(eq(200))
expect(response.dig("data", "errors")).to(eq(nil))
end
end
end

0 comments on commit 3f769b7

Please sign in to comment.