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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
5e2219db
Commit
5e2219db
authored
Mar 28, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unreversible migration, and small rubocop warnings
parent
d3e794e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
db/migrate/20170327091750_add_created_at_index_to_deployments.rb
...ate/20170327091750_add_created_at_index_to_deployments.rb
+5
-1
spec/controllers/projects/deployments_controller_spec.rb
spec/controllers/projects/deployments_controller_spec.rb
+2
-2
No files found.
db/migrate/20170327091750_add_created_at_index_to_deployments.rb
View file @
5e2219db
...
...
@@ -5,7 +5,11 @@ class AddCreatedAtIndexToDeployments < ActiveRecord::Migration
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:deployments
,
:created_at
end
def
down
remove_index
:deployments
,
:created_at
end
end
spec/controllers/projects/deployments_controller_spec.rb
View file @
5e2219db
...
...
@@ -20,7 +20,7 @@ describe Projects::DeploymentsController do
create
(
:deployment
,
environment:
environment
,
created_at:
7
.
hours
.
ago
)
create
(
:deployment
,
environment:
environment
)
get
:index
,
environment_params
(
:after
=>
8
.
hours
.
ago
)
get
:index
,
environment_params
(
after:
8
.
hours
.
ago
)
expect
(
response
).
to
be_ok
...
...
@@ -41,7 +41,7 @@ describe Projects::DeploymentsController do
end
end
def
environment_params
(
opts
=
{})
def
environment_params
(
opts
=
{})
opts
.
reverse_merge
(
namespace_id:
project
.
namespace
,
project_id:
project
,
environment_id:
environment
.
id
)
end
end
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