Update Code Review changes. DRYed up code, moved into partials.

updated unnecessary paranthesis/conditions. Added Rspec feature.
57 jobs for add-primary-button-email-confirmation in 134 minutes and 38 seconds (queued for 30 seconds)
latest
Status Job ID Name Coverage
  Build
manual #19461042
allowed to fail manual
build-package
 
  Prepare
passed #19461043
gitlab-org
knapsack

00:02:07

passed #19461044
gitlab-org
setup-test-env

00:25:44

 
  Test
passed #19461097
codeclimate

00:13:01

passed #19461089
gitlab-org
db:migrate:reset-mysql

00:25:40

failed #19493728
gitlab-org
db:migrate:reset-pg

00:04:38

passed #19461091
gitlab-org
db:rollback-mysql

00:14:44

passed #19461090
gitlab-org
db:rollback-pg

00:24:44

failed #19493765
gitlab-org
db:seed_fu-mysql

00:04:16

failed #19493960
gitlab-org
db:seed_fu-pg

00:02:38

passed #19461081
gitlab-org
docs lint

00:00:41

passed #19461085
gitlab-org
downtime_check

00:15:38

passed #19461095
gitlab-org
gitlab:assets:compile

00:47:53

passed #19493879
gitlab-org
karma

00:12:33

50.09%
failed #19493832
gitlab-org
rspec-pg 0 20

00:45:43

passed #19461046
gitlab-org
rspec-pg 1 20

00:31:07

failed #19461055
gitlab-org
rspec-pg 10 20

01:00:05

failed #19461056
gitlab-org
rspec-pg 11 20

00:37:50

failed #19461059
gitlab-org
rspec-pg 12 20

00:30:21

failed #19461061
gitlab-org
rspec-pg 13 20

00:59:03

failed #19461062
gitlab-org
rspec-pg 14 20

00:35:42

failed #19461064
gitlab-org
rspec-pg 15 20

00:55:03

failed #19461065
gitlab-org
rspec-pg 16 20

01:00:05

failed #19461066
gitlab-org
rspec-pg 17 20

00:32:08

failed #19461067
gitlab-org
rspec-pg 18 20

00:57:41

failed #19461069
gitlab-org
rspec-pg 19 20

01:00:10

failed #19493833
gitlab-org
rspec-pg 2 20

00:23:15

failed #19493834
gitlab-org
rspec-pg 3 20

00:27:34

failed #19493835
gitlab-org
rspec-pg 4 20

00:28:06

failed #19493837
gitlab-org
rspec-pg 5 20

00:44:29

failed #19461051
gitlab-org
rspec-pg 6 20

00:36:35

failed #19461052
gitlab-org
rspec-pg 7 20

00:27:59

failed #19461053
gitlab-org
rspec-pg 8 20

00:31:48

failed #19461054
gitlab-org
rspec-pg 9 20

01:00:04

passed #19461070
gitlab-org
spinach-pg 0 10

00:32:27

passed #19461071
gitlab-org
spinach-pg 1 10

00:26:28

passed #19461072
gitlab-org
spinach-pg 2 10

00:58:41

failed #19461073
gitlab-org
spinach-pg 3 10

00:21:37

failed #19461074
gitlab-org
spinach-pg 4 10

00:32:53

failed #19461075
gitlab-org
spinach-pg 5 10

00:20:04

failed #19461076
gitlab-org
spinach-pg 6 10

00:22:17

failed #19461077
gitlab-org
spinach-pg 7 10

00:26:20

passed #19461078
gitlab-org
spinach-pg 8 10

00:18:32

passed #19461079
gitlab-org
spinach-pg 9 10

00:17:00

failed #19493977
gitlab-org
static-analysis

00:17:59

failed #19461086
gitlab-org
db:migrate:reset-pg

00:22:57

failed #19461093
gitlab-org
db:seed_fu-mysql

00:18:08

failed #19461092
gitlab-org
db:seed_fu-pg

00:22:01

failed #19461096
gitlab-org
karma

00:39:58

50.1%
failed #19461045
gitlab-org
rspec-pg 0 20

00:35:00

failed #19461047
gitlab-org
rspec-pg 2 20

00:41:14

failed #19461048
gitlab-org
rspec-pg 3 20

00:29:37

failed #19461049
gitlab-org
rspec-pg 4 20

00:51:11

failed #19461050
gitlab-org
rspec-pg 5 20

00:45:21

failed #19461080
gitlab-org
static-analysis

00:29:11

 
  Post Test
skipped #19461098
gitlab-org
coverage
skipped #19461099
gitlab-org
lint:javascript:report
 
Name Stage Failure
failed
db:migrate:reset-pg Test There is an unknown failure, please try again
   -> 0.0107s
-- execute("\n ALTER TABLE \"oauth_openid_requests\"\n ADD CONSTRAINT \"fk_oauth_openid_requests_oauth_access_grants_access_grant_id\"\n FOREIGN KEY (\"access_grant_id\")\n REFERENCES \"oauth_access_grants\" (\"id\")\n NOT VALID;\n ")
-> 0.0030s
== 20161209165216 CreateDoorkeeperOpenidConnectTables: migrated (0.0139s) =====

== 20161211180736 AddConfirmedToEmails: migrating =============================
-- transaction_open?()
-> 0.0000s
ERROR: Job failed: exit code 1
failed
rspec-pg 9 20 Test There is an unknown failure, please try again
    #real_source_type

RSpec::Retry: 2nd try ./spec/models/members/group_member_spec.rb:75
example at ./spec/models/members/group_member_spec.rb:75 (FAILED - 79)
#update_two_factor_requirement

RSpec::Retry: 2nd try ./spec/models/members/group_member_spec.rb:83
is called after creation and deletion (FAILED - 80)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
rspec-pg 10 20 Test There is an unknown failure, please try again
  should respond to #status
#size
returns the number of statuses in the group
#detailed_status
when there is only one item in the group
calls the status from the object itself
when there are more than one commit status in the group
fabricates a new detailed status object
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
rspec-pg 16 20 Test There is an unknown failure, please try again

Editable
#is_edited?
should eq false
should eq true

Projects::AvatarsController
removes avatar from DB by calling destroy
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
rspec-pg 19 20 Test There is an unknown failure, please try again

Dashboard Issues filtering
filtering by milestone
shows all issues with no milestone
shows all issues with any milestone
shows all issues with the selected milestone

RSpec::Retry: 2nd try ./spec/features/dashboard_issues_spec.rb:48
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
static-analysis Test There is an unknown failure, please try again
Tasks: TOP => haml_lint
(See full trace by running task with --trace)

**** bundle exec rake scss_lint failed with the following error:

app/assets/stylesheets/framework/dropdowns.scss:107 [W] DuplicateProperty: Property `position` already defined on line 104

scss-lint found one or more lints
ERROR: Job failed: exit code 1
failed
spinach-pg 5 10 Test There is an unknown failure, please try again
Steps Summary: (0) Successful, (0) Pending, (0) Undefined, (0) Failed, (7) Error

Finished in 5.806042653 seconds
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 2 matching files
Uploading artifacts to coordinator... ok id=19461075 responseStatus=201 Created token=QRQ-SXcY
ERROR: Job failed: exit code 1
failed
rspec-pg 17 20 Test There is an unknown failure, please try again
rspec ./spec/helpers/namespaces_helper_spec.rb:15 # NamespacesHelper#namespaces_options returns groups without being a member for admin
rspec ./spec/helpers/namespaces_helper_spec.rb:24 # NamespacesHelper#namespaces_options returns only allowed namespaces for user

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 5 matching files
Uploading artifacts to coordinator... ok id=19461066 responseStatus=201 Created token=BZUJTG9g
ERROR: Job failed: exit code 1
failed
rspec-pg 8 20 Test There is an unknown failure, please try again
rspec ./spec/finders/group_members_finder_spec.rb:21 # GroupMembersFinder#execute returns members for nested group
rspec ./spec/controllers/groups/avatars_controller_spec.rb:12 # Groups::AvatarsController removes avatar from DB calling destroy

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 7 matching files
Uploading artifacts to coordinator... ok id=19461053 responseStatus=201 Created token=UWqdevCU
ERROR: Job failed: exit code 1
failed
spinach-pg 6 10 Test There is an unknown failure, please try again
Steps Summary: (7) Successful, (0) Pending, (0) Undefined, (0) Failed, (7) Error

Finished in 13.555905893 seconds
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 12 matching files
Uploading artifacts to coordinator... ok id=19461076 responseStatus=201 Created token=6exUPFUS
ERROR: Job failed: exit code 1
failed
rspec-pg 6 20 Test There is an unknown failure, please try again
rspec ./spec/features/dashboard/activity_spec.rb:9 # Dashboard Activity behaves like it has an RSS button with current_user's RSS token shows the RSS button with current_user's RSS token
rspec ./spec/features/dashboard/activity_spec.rb:10 # Dashboard Activity behaves like an autodiscoverable RSS feed with current_user's RSS token has an RSS autodiscovery link tag with current_user's RSS token

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 27 matching files
Uploading artifacts to coordinator... ok id=19461051 responseStatus=201 Created token=cRKpc7JU
ERROR: Job failed: exit code 1
failed
spinach-pg 3 10 Test There is an unknown failure, please try again
Steps Summary: (6) Successful, (0) Pending, (0) Undefined, (0) Failed, (6) Error

Finished in 8.718712065 seconds
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 8 matching files
Uploading artifacts to coordinator... ok id=19461073 responseStatus=201 Created token=yxybFCDs
ERROR: Job failed: exit code 1
failed
spinach-pg 4 10 Test There is an unknown failure, please try again
Steps Summary: (17) Successful, (0) Pending, (0) Undefined, (0) Failed, (12) Error

Finished in 39.568387051 seconds
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 16 matching files
Uploading artifacts to coordinator... ok id=19461074 responseStatus=201 Created token=ehnLg6yJ
ERROR: Job failed: exit code 1
failed
rspec-pg 14 20 Test There is an unknown failure, please try again
rspec ./spec/services/groups/create_service_spec.rb:34 # Groups::CreateService#execute creating subgroup as group owner 
rspec ./spec/services/groups/create_service_spec.rb:54 # Groups::CreateService#execute creating a mattermost team create the chat team with the group

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 11 matching files
Uploading artifacts to coordinator... ok id=19461062 responseStatus=201 Created token=yu_-sBji
ERROR: Job failed: exit code 1
failed
rspec-pg 11 20 Test There is an unknown failure, please try again
rspec ./spec/models/concerns/access_requestable_spec.rb:21 # AccessRequestable Group #access_requested? 
rspec ./spec/controllers/groups/labels_controller_spec.rb:14 # Groups::LabelsController POST #toggle_subscription allows user to toggle subscription on group labels

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 19 matching files
Uploading artifacts to coordinator... ok id=19461056 responseStatus=201 Created token=LP95_2rs
ERROR: Job failed: exit code 1
failed
rspec-pg 13 20 Test There is an unknown failure, please try again
rspec ./spec/services/projects/participants_service_spec.rb:11 # Projects::ParticipantsService#groups avatar_url should return an url for the avatar
rspec ./spec/services/projects/participants_service_spec.rb:19 # Projects::ParticipantsService#groups avatar_url should return an url for the avatar with relative url

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 9 matching files
Uploading artifacts to coordinator... ok id=19461061 responseStatus=201 Created token=WYtXd54y
ERROR: Job failed: exit code 1
failed
spinach-pg 7 10 Test There is an unknown failure, please try again
Steps Summary: (1) Successful, (0) Pending, (0) Undefined, (0) Failed, (1) Error

Finished in 3.716933547 seconds
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=19461077 responseStatus=201 Created token=muSUTSjo
ERROR: Job failed: exit code 1
failed
rspec-pg 12 20 Test There is an unknown failure, please try again
rspec './spec/services/members/request_access_service_spec.rb[1:4:2:2]' # Members::RequestAccessService when current user can request access to the project behaves like a service creating a access request returns a <Source>Member
rspec ./spec/features/users/rss_spec.rb:12 # User RSS when signed in behaves like it has an RSS button with current_user's RSS token shows the RSS button with current_user's RSS token

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 7 matching files
Uploading artifacts to coordinator... ok id=19461059 responseStatus=201 Created token=vULyTnW-
ERROR: Job failed: exit code 1
failed
rspec-pg 7 20 Test There is an unknown failure, please try again
rspec ./spec/features/projects/new_project_spec.rb:84 # New project Namespace selector with subgroup namespace selects the group namespace
rspec ./spec/lib/banzai/reference_parser/user_parser_spec.rb:19 # Banzai::ReferenceParser::UserParser#referenced_by when the link has a data-group attribute using an existing group ID returns the users of the group

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 7 matching files
Uploading artifacts to coordinator... ok id=19461052 responseStatus=201 Created token=oiTJ5NQs
ERROR: Job failed: exit code 1
failed
rspec-pg 15 20 Test There is an unknown failure, please try again
rspec ./spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb:17 # Projects > Members > Group requester cannot request access to project group requester does not see the request access / withdraw access request button
rspec ./spec/features/groups/labels/edit_spec.rb:14 # Edit group label update label with new title

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=19461064 responseStatus=201 Created token=Z_ik3XUm
ERROR: Job failed: exit code 1
failed
rspec-pg 18 20 Test There is an unknown failure, please try again
rspec ./spec/features/groups/activity_spec.rb:15 # Group activity page when signed in behaves like an autodiscoverable RSS feed with current_user's RSS token has an RSS autodiscovery link tag with current_user's RSS token
rspec ./spec/lib/gitlab/google_code_import/project_creator_spec.rb:18 # Gitlab::GoogleCodeImport::ProjectCreator creates project

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=19461067 responseStatus=201 Created token=y-Yp2Hxf
ERROR: Job failed: exit code 1
failed
rspec-pg 2 20 Test There is an unknown failure, please try again
rspec ./spec/requests/api/v3/groups_spec.rb:547 # API::V3::Groups POST /groups/:id/projects/:project_id when authenticated as admin when using a group path in URL with a valid group path transfers project to group
rspec ./spec/requests/api/v3/groups_spec.rb:555 # API::V3::Groups POST /groups/:id/projects/:project_id when authenticated as admin when using a group path in URL with a non-existent group path does not transfer project to group

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=19493833 responseStatus=201 Created token=4nPGdyqu
ERROR: Job failed: exit code 1
failed
rspec-pg 4 20 Test There is an unknown failure, please try again
rspec ./spec/features/atom/dashboard_issues_spec.rb:67 # Dashboard Issues Feed GET /issues atom feed issue with label and milestone renders issue label and milestone info
rspec ./spec/lib/gitlab/gitlab_import/project_creator_spec.rb:23 # Gitlab::GitlabImport::ProjectCreator creates project

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 5 matching files
Uploading artifacts to coordinator... ok id=19493835 responseStatus=201 Created token=YNYeuR4y
ERROR: Job failed: exit code 1
failed
rspec-pg 3 20 Test There is an unknown failure, please try again
rspec ./spec/features/security/group/private_access_spec.rb:88 # Private Group access GET /groups/:path/edit should be denied for reporter
rspec ./spec/features/security/group/private_access_spec.rb:89 # Private Group access GET /groups/:path/edit should be denied for guest

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 17 matching files
Uploading artifacts to coordinator... ok id=19493834 responseStatus=201 Created token=iWheE-mx
ERROR: Job failed: exit code 1
failed
rspec-pg 5 20 Test There is an unknown failure, please try again
rspec ./spec/workers/remove_expired_members_worker_spec.rb:43 # RemoveExpiredMembersWorker#perform group members leaves members that do not expire at all
rspec ./spec/workers/remove_expired_members_worker_spec.rb:52 # RemoveExpiredMembersWorker#perform when the last group owner expires does not delete the owner

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
tmp/capybara/: found 27 matching files
Uploading artifacts to coordinator... ok id=19493837 responseStatus=201 Created token=zE8ySkuB
ERROR: Job failed: exit code 1
failed
rspec-pg 0 20 Test There is an unknown failure, please try again
rspec './spec/finders/access_requests_finder_spec.rb[1:2:2:2:1]' # AccessRequestsFinder#execute! when current user can see access requests behaves like a finder returning access requesters returns access requesters
rspec ./spec/controllers/profiles/emails_controller_spec.rb:65 # Profiles::EmailsController PUT make_primary when email with the specified id is found when email update fails should set a error flash alert

Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 5 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=19493832 responseStatus=201 Created token=ze3qJh2z
ERROR: Job failed: exit code 1
failed
db:seed_fu-mysql Test There is an unknown failure, please try again
**************************************************

OK

== Seed from /builds/gauravmanchanda/gitlab-ce/db/fixtures/development/04_project.rb
Uploading artifacts...
log/development.log: found 1 matching files
Uploading artifacts to coordinator... ok id=19493765 responseStatus=201 Created token=3XRnVmE9
ERROR: Job failed: exit code 1
failed
db:seed_fu-pg Test There is an unknown failure, please try again
**************************************************

OK

== Seed from /builds/gauravmanchanda/gitlab-ce/db/fixtures/development/04_project.rb
Uploading artifacts...
log/development.log: found 1 matching files
Uploading artifacts to coordinator... ok id=19493960 responseStatus=201 Created token=sLtdspyL
ERROR: Job failed: exit code 1