Temporary remove organizations from API

This commit is contained in:
Alberto Miedes Garcés
2016-12-26 20:45:46 +01:00
parent 2311cd4b1d
commit 2741dcf03c
2 changed files with 2 additions and 2 deletions

View File

@@ -1,9 +1,7 @@
API_TYPE_DEFINITIONS = {
User => %I[ id username proposals organization ],
Debate => %I[ id title description author_id author created_at comments ],
Proposal => %I[ id title description external_url cached_votes_up comments_count hot_score confidence_score created_at summary video_url geozone_id retired_at retired_reason retired_explanation geozone comments public_author ],
Comment => %I[ id body user_id user commentable_id ],
Organization => %I[ id name ]
}
type_creator = GraphQL::TypeCreator.new

View File

@@ -29,6 +29,7 @@ describe ConsulSchema do
end
it "returns has_one associations" do
pending "Organizations are not being exposed yet"
organization = create(:organization)
response = execute("{ user(id: #{organization.user_id}) { organization { name } } }")
expect(dig(response, 'data.user.organization.name')).to eq(organization.name)
@@ -52,6 +53,7 @@ describe ConsulSchema do
end
it "executes deeply nested queries" do
pending "Organizations are not being exposed yet"
org_user = create(:user)
organization = create(:organization, user: org_user)
org_proposal = create(:proposal, author: org_user)