Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
aaab884f
Commit
aaab884f
authored
Aug 21, 2013
by
Cuong Tran
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #137 from AMekss/fix_composite_primary_keys_test
Fix composite primary keys test
parents
f1af392d
8f958f43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+4
-4
No files found.
spec/annotate/annotate_models_spec.rb
View file @
aaab884f
...
...
@@ -8,7 +8,7 @@ describe AnnotateModels do
options
=
{
:connection
=>
mock
(
"Conn"
,
:indexes
=>
[]),
:table_name
=>
table_name
,
:primary_key
=>
primary_key
&&
primary_key
.
to_s
,
:primary_key
=>
primary_key
,
:column_names
=>
columns
.
map
{
|
col
|
col
.
name
.
to_s
},
:columns
=>
columns
}
...
...
@@ -72,7 +72,7 @@ EOS
end
it
"should get schema info even if the primary key is array, if using composite_primary_keys"
do
klass
=
mock_class
(
:users
,
nil
,
[
klass
=
mock_class
(
:users
,
[
:a_id
,
:b_id
]
,
[
mock_column
(
:a_id
,
:integer
),
mock_column
(
:b_id
,
:integer
),
mock_column
(
:name
,
:string
,
:limit
=>
50
)
...
...
@@ -83,8 +83,8 @@ EOS
#
# Table name: users
#
# a_id :integer not null
# b_id :integer not null
# a_id :integer not null
, primary key
# b_id :integer not null
, primary key
# name :string(50) not null
#
EOS
...
...
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