Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
13c59342
Commit
13c59342
authored
May 27, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move NoPrimaryClass table def to last spec
parent
ff4425ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
changelogs/unreleased/followup-leakyconst-master-check.yml
changelogs/unreleased/followup-leakyconst-master-check.yml
+5
-0
spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb
spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb
+8
-8
No files found.
changelogs/unreleased/followup-leakyconst-master-check.yml
0 → 100644
View file @
13c59342
---
title
:
Move NoPrimary table def to last context in spec
merge_request
:
33015
author
:
Rajendra Kadam
type
:
other
spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb
View file @
13c59342
...
...
@@ -9,14 +9,6 @@ describe Gitlab::Graphql::Pagination::Keyset::Connection do
let
(
:schema
)
{
GraphQL
::
Schema
.
define
(
query:
query_type
,
mutation:
nil
)}
let
(
:context
)
{
GraphQL
::
Query
::
Context
.
new
(
query:
OpenStruct
.
new
(
schema:
schema
),
values:
nil
,
object:
nil
)
}
before
do
stub_const
(
'NoPrimaryKey'
,
Class
.
new
(
ActiveRecord
::
Base
))
NoPrimaryKey
.
class_eval
do
self
.
table_name
=
'no_primary_key'
self
.
primary_key
=
nil
end
end
subject
(
:connection
)
do
described_class
.
new
(
nodes
,
{
context:
context
,
max_page_size:
3
}.
merge
(
arguments
))
end
...
...
@@ -303,6 +295,14 @@ describe Gitlab::Graphql::Pagination::Keyset::Connection do
end
context
'when there is no primary key'
do
before
do
stub_const
(
'NoPrimaryKey'
,
Class
.
new
(
ActiveRecord
::
Base
))
NoPrimaryKey
.
class_eval
do
self
.
table_name
=
'no_primary_key'
self
.
primary_key
=
nil
end
end
let
(
:nodes
)
{
NoPrimaryKey
.
all
}
it
'raises an error'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment