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
iv
gitlab-ce
Commits
bf71d53f
Commit
bf71d53f
authored
Jun 17, 2015
by
Robert Speicher
Committed by
Dmitriy Zaporozhets
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change `to_not` calls to `not_to`
Both work, but now we're consistent across the entire app.
parent
0f627f1c
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
25 additions
and
25 deletions
+25
-25
spec/controllers/commit_controller_spec.rb
spec/controllers/commit_controller_spec.rb
+4
-4
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+4
-4
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+1
-1
spec/lib/gitlab/auth_spec.rb
spec/lib/gitlab/auth_spec.rb
+2
-2
spec/lib/gitlab/google_code_import/client_spec.rb
spec/lib/gitlab/google_code_import/client_spec.rb
+1
-1
spec/lib/gitlab/google_code_import/importer_spec.rb
spec/lib/gitlab/google_code_import/importer_spec.rb
+4
-4
spec/lib/gitlab/ldap/user_spec.rb
spec/lib/gitlab/ldap/user_spec.rb
+2
-2
spec/lib/gitlab/o_auth/auth_hash_spec.rb
spec/lib/gitlab/o_auth/auth_hash_spec.rb
+1
-1
spec/requests/api/project_members_spec.rb
spec/requests/api/project_members_spec.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+2
-2
spec/requests/api/system_hooks_spec.rb
spec/requests/api/system_hooks_spec.rb
+1
-1
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+1
-1
spec/tasks/gitlab/mail_google_schema_whitelisting.rb
spec/tasks/gitlab/mail_google_schema_whitelisting.rb
+1
-1
No files found.
spec/controllers/commit_controller_spec.rb
View file @
bf71d53f
...
@@ -40,10 +40,10 @@ describe Projects::CommitController do
...
@@ -40,10 +40,10 @@ describe Projects::CommitController do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
id:
commit
.
id
,
format:
format
)
project_id:
project
.
to_param
,
id:
commit
.
id
,
format:
format
)
expect
(
response
.
body
).
to_not
include
(
'&'
)
expect
(
response
.
body
).
not_to
include
(
'&'
)
expect
(
response
.
body
).
to_not
include
(
'>'
)
expect
(
response
.
body
).
not_to
include
(
'>'
)
expect
(
response
.
body
).
to_not
include
(
'<'
)
expect
(
response
.
body
).
not_to
include
(
'<'
)
expect
(
response
.
body
).
to_not
include
(
'"'
)
expect
(
response
.
body
).
not_to
include
(
'"'
)
end
end
end
end
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
bf71d53f
...
@@ -40,10 +40,10 @@ describe Projects::MergeRequestsController do
...
@@ -40,10 +40,10 @@ describe Projects::MergeRequestsController do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
id:
merge_request
.
iid
,
format:
format
)
project_id:
project
.
to_param
,
id:
merge_request
.
iid
,
format:
format
)
expect
(
response
.
body
).
to_not
include
(
'&'
)
expect
(
response
.
body
).
not_to
include
(
'&'
)
expect
(
response
.
body
).
to_not
include
(
'>'
)
expect
(
response
.
body
).
not_to
include
(
'>'
)
expect
(
response
.
body
).
to_not
include
(
'<'
)
expect
(
response
.
body
).
not_to
include
(
'<'
)
expect
(
response
.
body
).
to_not
include
(
'"'
)
expect
(
response
.
body
).
not_to
include
(
'"'
)
end
end
end
end
...
...
spec/features/issues_spec.rb
View file @
bf71d53f
...
@@ -38,7 +38,7 @@ describe 'Issues', feature: true do
...
@@ -38,7 +38,7 @@ describe 'Issues', feature: true do
it
'does not change issue count'
do
it
'does not change issue count'
do
expect
{
expect
{
click_button
'Save changes'
click_button
'Save changes'
}.
to_not
change
{
Issue
.
count
}
}.
not_to
change
{
Issue
.
count
}
end
end
it
'should update issue fields'
do
it
'should update issue fields'
do
...
...
spec/lib/gitlab/auth_spec.rb
View file @
bf71d53f
...
@@ -27,12 +27,12 @@ describe Gitlab::Auth do
...
@@ -27,12 +27,12 @@ describe Gitlab::Auth do
it
"should not find user with invalid password"
do
it
"should not find user with invalid password"
do
password
=
'wrong'
password
=
'wrong'
expect
(
gl_auth
.
find
(
username
,
password
)
).
to_not
eql
user
expect
(
gl_auth
.
find
(
username
,
password
)
).
not_to
eql
user
end
end
it
"should not find user with invalid login"
do
it
"should not find user with invalid login"
do
user
=
'wrong'
user
=
'wrong'
expect
(
gl_auth
.
find
(
username
,
password
)
).
to_not
eql
user
expect
(
gl_auth
.
find
(
username
,
password
)
).
not_to
eql
user
end
end
context
"with ldap enabled"
do
context
"with ldap enabled"
do
...
...
spec/lib/gitlab/google_code_import/client_spec.rb
View file @
bf71d53f
...
@@ -15,7 +15,7 @@ describe Gitlab::GoogleCodeImport::Client do
...
@@ -15,7 +15,7 @@ describe Gitlab::GoogleCodeImport::Client do
let
(
:raw_data
)
{
"No clue"
}
let
(
:raw_data
)
{
"No clue"
}
it
"returns true"
do
it
"returns true"
do
expect
(
subject
).
to_not
be_valid
expect
(
subject
).
not_to
be_valid
end
end
end
end
end
end
...
...
spec/lib/gitlab/google_code_import/importer_spec.rb
View file @
bf71d53f
...
@@ -25,7 +25,7 @@ describe Gitlab::GoogleCodeImport::Importer do
...
@@ -25,7 +25,7 @@ describe Gitlab::GoogleCodeImport::Importer do
subject
.
execute
subject
.
execute
%w(New NeedInfo Accepted Wishlist Started Fixed Invalid Duplicate WontFix Incomplete)
.
each
do
|
status
|
%w(New NeedInfo Accepted Wishlist Started Fixed Invalid Duplicate WontFix Incomplete)
.
each
do
|
status
|
expect
(
project
.
labels
.
find_by
(
name:
"Status:
#{
status
}
"
)).
to_not
be_nil
expect
(
project
.
labels
.
find_by
(
name:
"Status:
#{
status
}
"
)).
not_to
be_nil
end
end
end
end
...
@@ -39,7 +39,7 @@ describe Gitlab::GoogleCodeImport::Importer do
...
@@ -39,7 +39,7 @@ describe Gitlab::GoogleCodeImport::Importer do
Component-Systray Component-Clock Component-Launcher Component-Tint2conf Component-Docs Component-New
Component-Systray Component-Clock Component-Launcher Component-Tint2conf Component-Docs Component-New
)
.
each
do
|
label
|
)
.
each
do
|
label
|
label
.
sub!
(
"-"
,
": "
)
label
.
sub!
(
"-"
,
": "
)
expect
(
project
.
labels
.
find_by
(
name:
label
)).
to_not
be_nil
expect
(
project
.
labels
.
find_by
(
name:
label
)).
not_to
be_nil
end
end
end
end
...
@@ -47,7 +47,7 @@ describe Gitlab::GoogleCodeImport::Importer do
...
@@ -47,7 +47,7 @@ describe Gitlab::GoogleCodeImport::Importer do
subject
.
execute
subject
.
execute
issue
=
project
.
issues
.
first
issue
=
project
.
issues
.
first
expect
(
issue
).
to_not
be_nil
expect
(
issue
).
not_to
be_nil
expect
(
issue
.
iid
).
to
eq
(
169
)
expect
(
issue
.
iid
).
to
eq
(
169
)
expect
(
issue
.
author
).
to
eq
(
project
.
creator
)
expect
(
issue
.
author
).
to
eq
(
project
.
creator
)
expect
(
issue
.
assignee
).
to
eq
(
mapped_user
)
expect
(
issue
.
assignee
).
to
eq
(
mapped_user
)
...
@@ -72,7 +72,7 @@ describe Gitlab::GoogleCodeImport::Importer do
...
@@ -72,7 +72,7 @@ describe Gitlab::GoogleCodeImport::Importer do
subject
.
execute
subject
.
execute
note
=
project
.
issues
.
first
.
notes
.
first
note
=
project
.
issues
.
first
.
notes
.
first
expect
(
note
).
to_not
be_nil
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
include
(
"Comment 1"
)
expect
(
note
.
note
).
to
include
(
"Comment 1"
)
expect
(
note
.
note
).
to
include
(
"@
#{
mapped_user
.
username
}
"
)
expect
(
note
.
note
).
to
include
(
"@
#{
mapped_user
.
username
}
"
)
expect
(
note
.
note
).
to
include
(
"November 18, 2009 05:14"
)
expect
(
note
.
note
).
to
include
(
"November 18, 2009 05:14"
)
...
...
spec/lib/gitlab/ldap/user_spec.rb
View file @
bf71d53f
...
@@ -35,12 +35,12 @@ describe Gitlab::LDAP::User do
...
@@ -35,12 +35,12 @@ describe Gitlab::LDAP::User do
it
"finds the user if already existing"
do
it
"finds the user if already existing"
do
create
(
:omniauth_user
,
extern_uid:
'my-uid'
,
provider:
'ldapmain'
)
create
(
:omniauth_user
,
extern_uid:
'my-uid'
,
provider:
'ldapmain'
)
expect
{
ldap_user
.
save
}.
to_not
change
{
User
.
count
}
expect
{
ldap_user
.
save
}.
not_to
change
{
User
.
count
}
end
end
it
"connects to existing non-ldap user if the email matches"
do
it
"connects to existing non-ldap user if the email matches"
do
existing_user
=
create
(
:omniauth_user
,
email:
'john@example.com'
,
provider:
"twitter"
)
existing_user
=
create
(
:omniauth_user
,
email:
'john@example.com'
,
provider:
"twitter"
)
expect
{
ldap_user
.
save
}.
to_not
change
{
User
.
count
}
expect
{
ldap_user
.
save
}.
not_to
change
{
User
.
count
}
existing_user
.
reload
existing_user
.
reload
expect
(
existing_user
.
ldap_identity
.
extern_uid
).
to
eql
'my-uid'
expect
(
existing_user
.
ldap_identity
.
extern_uid
).
to
eql
'my-uid'
...
...
spec/lib/gitlab/o_auth/auth_hash_spec.rb
View file @
bf71d53f
...
@@ -51,7 +51,7 @@ describe Gitlab::OAuth::AuthHash do
...
@@ -51,7 +51,7 @@ describe Gitlab::OAuth::AuthHash do
it
{
expect
(
auth_hash
.
email
).
to
eql
email_utf8
}
it
{
expect
(
auth_hash
.
email
).
to
eql
email_utf8
}
it
{
expect
(
auth_hash
.
username
).
to
eql
nickname_utf8
}
it
{
expect
(
auth_hash
.
username
).
to
eql
nickname_utf8
}
it
{
expect
(
auth_hash
.
name
).
to
eql
name_utf8
}
it
{
expect
(
auth_hash
.
name
).
to
eql
name_utf8
}
it
{
expect
(
auth_hash
.
password
).
to_not
be_empty
}
it
{
expect
(
auth_hash
.
password
).
not_to
be_empty
}
end
end
context
'email not provided'
do
context
'email not provided'
do
...
...
spec/requests/api/project_members_spec.rb
View file @
bf71d53f
...
@@ -132,7 +132,7 @@ describe API::API, api: true do
...
@@ -132,7 +132,7 @@ describe API::API, api: true do
delete
api
(
"/projects/
#{
project
.
id
}
/members/
#{
user3
.
id
}
"
,
user
)
delete
api
(
"/projects/
#{
project
.
id
}
/members/
#{
user3
.
id
}
"
,
user
)
expect
{
expect
{
delete
api
(
"/projects/
#{
project
.
id
}
/members/
#{
user3
.
id
}
"
,
user
)
delete
api
(
"/projects/
#{
project
.
id
}
/members/
#{
user3
.
id
}
"
,
user
)
}.
to_not
change
{
ProjectMember
.
count
}
}.
not_to
change
{
ProjectMember
.
count
}
end
end
it
"should return 200 if team member already removed"
do
it
"should return 200 if team member already removed"
do
...
...
spec/requests/api/projects_spec.rb
View file @
bf71d53f
...
@@ -155,7 +155,7 @@ describe API::API, api: true do
...
@@ -155,7 +155,7 @@ describe API::API, api: true do
end
end
it
'should not create new project without name and return 400'
do
it
'should not create new project without name and return 400'
do
expect
{
post
api
(
'/projects'
,
user
)
}.
to_not
change
{
Project
.
count
}
expect
{
post
api
(
'/projects'
,
user
)
}.
not_to
change
{
Project
.
count
}
expect
(
response
.
status
).
to
eq
(
400
)
expect
(
response
.
status
).
to
eq
(
400
)
end
end
...
@@ -254,7 +254,7 @@ describe API::API, api: true do
...
@@ -254,7 +254,7 @@ describe API::API, api: true do
it
'should respond with 400 on failure and not project'
do
it
'should respond with 400 on failure and not project'
do
expect
{
post
api
(
"/projects/user/
#{
user
.
id
}
"
,
admin
)
}.
expect
{
post
api
(
"/projects/user/
#{
user
.
id
}
"
,
admin
)
}.
to_not
change
{
Project
.
count
}
not_to
change
{
Project
.
count
}
expect
(
response
.
status
).
to
eq
(
400
)
expect
(
response
.
status
).
to
eq
(
400
)
expect
(
json_response
[
'message'
][
'name'
]).
to
eq
([
expect
(
json_response
[
'message'
][
'name'
]).
to
eq
([
...
...
spec/requests/api/system_hooks_spec.rb
View file @
bf71d53f
...
@@ -49,7 +49,7 @@ describe API::API, api: true do
...
@@ -49,7 +49,7 @@ describe API::API, api: true do
it
"should not create new hook without url"
do
it
"should not create new hook without url"
do
expect
{
expect
{
post
api
(
"/hooks"
,
admin
)
post
api
(
"/hooks"
,
admin
)
}.
to_not
change
{
SystemHook
.
count
}
}.
not_to
change
{
SystemHook
.
count
}
end
end
end
end
...
...
spec/tasks/gitlab/backup_rake_spec.rb
View file @
bf71d53f
...
@@ -150,7 +150,7 @@ describe 'gitlab:app namespace rake task' do
...
@@ -150,7 +150,7 @@ describe 'gitlab:app namespace rake task' do
expect
(
Rake
::
Task
[
"gitlab:backup:db:restore"
]).
to
receive
:invoke
expect
(
Rake
::
Task
[
"gitlab:backup:db:restore"
]).
to
receive
:invoke
expect
(
Rake
::
Task
[
"gitlab:backup:repo:restore"
]).
not_to
receive
:invoke
expect
(
Rake
::
Task
[
"gitlab:backup:repo:restore"
]).
not_to
receive
:invoke
expect
(
Rake
::
Task
[
"gitlab:shell:setup"
]).
to
receive
:invoke
expect
(
Rake
::
Task
[
"gitlab:shell:setup"
]).
to
receive
:invoke
expect
{
run_rake_task
(
'gitlab:backup:restore'
)
}.
to_not
raise_error
expect
{
run_rake_task
(
'gitlab:backup:restore'
)
}.
not_to
raise_error
end
end
end
end
end
# gitlab:app namespace
end
# gitlab:app namespace
spec/tasks/gitlab/mail_google_schema_whitelisting.rb
View file @
bf71d53f
...
@@ -21,7 +21,7 @@ describe 'gitlab:mail_google_schema_whitelisting rake task' do
...
@@ -21,7 +21,7 @@ describe 'gitlab:mail_google_schema_whitelisting rake task' do
end
end
it
'should run the task without errors'
do
it
'should run the task without errors'
do
expect
{
run_rake_task
}.
to_not
raise_error
expect
{
run_rake_task
}.
not_to
raise_error
end
end
end
end
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