Douwe Maan
546731244a
Merge branch 'rs-security-spec-speed' into 'master'
...
Speed up security feature specs
Before: `rspec spec/features/security/ 0.12s user 0.04s system 0% cpu 3:38.00 total`
After: `rspec spec/features/security/ 0.12s user 0.04s system 0% cpu 1:40.58 total`
The majority of the speed improvements is from two things:
1. Instead of using our standard `login_as` helper in the matchers, we take advantage
of the `Warden::Test::Helpers` version of the method which bypasses the login form
and logs the user in directly. We were essentially testing that filling out the login
form works hundreds of times.
2. There were many tests that verified if a user of a certain access level
(master, owner, reporter, guest) had access to a resource. Unfortunately we were
creating every type of user for each test even though a test was only verifying one of
them at a time. Now the tests only create the one user role they're testing.
See merge request !1023
2015-07-22 09:22:43 +00:00
Robert Speicher
b42422a7a9
Move spec/features/admin/security_spec to spec/features/security
2015-07-22 00:39:18 -04:00
Robert Speicher
b24d5f13a5
Consolidate group access specs into one file
2015-07-22 00:01:17 -04:00
Robert Speicher
0d5cf111f3
Move custom matchers to their own files under spec/support/matchers
2015-07-22 00:01:17 -04:00
Robert Speicher
ff8811c40b
Remove redundant Profile access test cases
...
The user being created was no different than what `be_allowed_for` was
doing behind the scenes so we were essentially testing all user-level
accesses twice.
2015-07-22 00:01:17 -04:00
Robert Speicher
421b06508d
Remove be_not_found_for matcher
...
It was only used in one test, and the test was kind of redundant.
2015-07-22 00:01:17 -04:00
Robert Speicher
a2ecfdc585
Move access-related matchers to their own module
2015-07-22 00:01:17 -04:00
Robert Speicher
1fee24a361
Remove unused be_valid_commit matcher
2015-07-21 22:11:08 -04:00
Stan Hu
5aff5223d4
Clearing the entire Redis cache may be too expensive; just use
...
the repository expire_cache method
2015-07-21 19:09:33 -07:00
Stan Hu
643557dabc
Fix 404 error in files view after deleting the last file in a repository
...
Closes #1362
2015-07-21 14:12:43 -07:00
Sven Strickroth
5eeab9f0a6
GoogleCode importer: Do not care about casing of image file extensions
...
Signed-off-by: Sven Strickroth <email@cs-ware.de >
2015-07-20 00:53:43 +02:00
Robert Speicher
dd6daf4656
Add test case for clicking line number anchor icon
2015-07-17 20:40:56 -04:00
Stan Hu
a84ed6eb23
Merge branch 'add-support-remove-milestone' into 'master'
...
Add support for destroying project milestones
### What does this MR do?
This MR adds a "Remove" button to the project milestones page and the milestone page itself.
### Why was this MR needed?
Because lots of people talked about needing to clean their toilets. :)
### What are the relevant issue numbers?
Closes https://github.com/gitlabhq/gitlabhq/issues/1504
### Screenshots


See merge request !980
2015-07-17 17:15:27 +00:00
Marin Jankovski
77f325a49f
Do not disappoint rubocop.
2015-07-17 17:17:33 +02:00
Marin Jankovski
c7daa5f17f
Add specs for gitlab ci service validity.
2015-07-17 17:03:15 +02:00
Marin Jankovski
302c52551a
Fix failing specs after adding format verification for token and project url in gitlab ci service.
2015-07-17 15:58:26 +02:00
Stan Hu
df2bb60f90
Add support for destroying project milestones
...
Closes https://github.com/gitlabhq/gitlabhq/issues/1504
2015-07-17 06:54:32 -07:00
Dmitriy Zaporozhets
87e6786aa0
Merge branch 'rs-fix-coverage' into 'master'
...
Move coverage-related setup back to spec_helper
These tools must be loaded before our regular Rails environment.
Partially reverts 57830201a9
See merge request !976
2015-07-14 09:03:03 +00:00
Robert Speicher
ce02bf9900
Move coverage-related setup back to spec_helper
...
These tools must be loaded before our regular Rails environment.
2015-07-13 22:41:47 -04:00
Robert Speicher
f3d4767d0c
Rename notice_added_references to create_new_cross_references!
2015-07-13 21:31:16 -04:00
Robert Speicher
e4c698fd5c
Refactor Mentionable#notice_added_references
...
It now accounts for models that have changed but have already been
persisted, such as when called from an UpdateService.
Closes #1773
2015-07-13 21:31:00 -04:00
Dmitriy Zaporozhets
00053c805c
Merge branch 'ssh-key-linebreaks' into 'master'
...
Add error message for SSH key linebreaks
Solves this [request](http://feedback.gitlab.com/forums/176466-general/suggestions/5653544-check-for-linebreaks-in-ssh-key ).
See merge request !672
2015-07-13 09:33:55 +00:00
Dmitriy Zaporozhets
171d6fccae
Merge branch 'rs-disable-2fa-by-admin' into 'master'
...
Allow admins to disable 2FA for a user
> 
Depends on !961
See merge request !962
2015-07-13 08:49:46 +00:00
Dmitriy Zaporozhets
d93da8bed5
Merge branch 'rs-disable-2fa' into 'master'
...
Add User#disable_two_factor!
This method encapsulates all the logic for disabling 2FA on a specific
User model.
See merge request !961
2015-07-13 08:47:55 +00:00
Dmitriy Zaporozhets
10d5da784b
Merge branch 'fix-api-project-transfer' into 'master'
...
Fix transferring of project to another group using the API.
Addresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2397 .
See merge request !926
2015-07-13 08:42:42 +00:00
Dmitriy Zaporozhets
d3d1e9ef65
Merge branch 'search-git-grep' into 'master'
...
Implement faster search of code (via git grep)
Much faster than iterating over each file using rugged.
Performance compare for Linux repository using keyword `sha`:
```
OLD: 250 seconds
NEW: 9 seconds
```
See merge request !957
2015-07-12 13:03:12 +00:00
Dmitriy Zaporozhets
ec19a960ca
Add tests for repository search files
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-12 14:32:25 +02:00
Douwe Maan and Robert Speicher
29cbb2f078
Update specs.
2015-07-11 16:47:33 -04:00
Nikita Verkhovin
562d78a65a
Add error message for SSH key linebreaks
2015-07-12 00:18:56 +06:00
Stan Hu
96644c1fc1
Better handle unknown projects and groups for autocomplete
2015-07-11 06:19:32 -07:00
Hannes Rosenögger
d0b240136a
Merge branch 'fix-autocomplete-with-public-projects' into 'master'
...
Fix user autocomplete for unauthenticated users accessing public projects
Closes #1955
See merge request !963
2015-07-11 12:54:09 +00:00
Stan Hu
0b67d7a0fe
Fix user autocomplete for unauthenticated users accessing public projects
...
Closes #1955
2015-07-10 17:39:58 -07:00
Robert Speicher
db8f4c0606
Add a button to Admin::Users#show to disable 2FA for that user
2015-07-10 17:18:33 -04:00
Robert Speicher
800df45db2
Add disable_two_factor route for Admin::Users
2015-07-10 17:18:17 -04:00
Robert Speicher
22724418d3
Add User#disable_two_factor!
...
This method encapsulates all the logic for disabling 2FA on a specific
User model.
2015-07-10 16:18:30 -04:00
Dmitriy Zaporozhets
bda04bc687
Merge branch 'fork_visibility_level' into 'master'
...
Forks should not have more permissive visibility levels than the original
https://dev.gitlab.org/gitlab/gitlabhq/issues/2286
See merge request !936
2015-07-10 12:05:54 +00:00
Dmitriy Zaporozhets
fdbaffdc08
Merge branch 'comment-box-changes' of gitlab.com:gitlab-org/gitlab-ce
2015-07-10 13:13:02 +02:00
Darby
360ee25ddb
Fixed the issues
2015-07-09 13:38:33 -07:00
Dmitriy Zaporozhets
27a9ff8264
Merge branch 'rs-dev-issue-2372' into 'master'
...
Filter by issues/merge requests without a milestone
Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2372
See merge request !886
2015-07-08 21:42:29 +00:00
Stan Hu and Robert Speicher
098ced4faa
Improve features to ensure Ajax filter has actually executed
2015-07-08 15:57:24 -04:00
Robert Speicher
098ad0a5b4
Remove "mystery guest" from Milestone filtering features
2015-07-08 15:49:37 -04:00
Dmitriy Zaporozhets
f76092c06d
Merge branch 'settings-via-api' into 'master'
...
API to set application settings for admin
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
See merge request !934
2015-07-07 10:57:41 +00:00
Robert Speicher
cf7c57aaf5
Use stub_application_setting in a few more specs
...
These specs also failed when run by themselves before this change, so
we've likely got some kind of cross-test contamination going on.
2015-07-06 22:39:56 -04:00
Robert Speicher
4b4351a18c
Add feature tag to feature specs
...
Not to be confused with the RSpec `type: :feature` tag, this tag is used
by the `spec:feature` Rake task for filtering/grouping specs.
2015-07-06 22:39:55 -04:00
Robert Speicher
d00cb00d6b
Rename NoMilestone to Milestone::None
...
Also refactors IssuableFinder to avoid redundant title check.
2015-07-06 22:39:55 -04:00
Robert Speicher
cfd813402d
Remove duplicate feature spec for filtering issues by no milestone
2015-07-06 22:39:55 -04:00
Robert Speicher
3ee3cb24d4
Allow user to filter by Issues/Merge Requests without a Milestone
2015-07-06 22:39:55 -04:00
Stan Hu
4254f09eaa
Return 40x error codes if branch could not be deleted in UI
2015-07-06 09:47:22 -07:00
Dmitriy Zaporozhets
603ceea21a
Add tests and improve logic
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-06 16:47:19 +02:00
Valery Sizov
111ebe5471
Fork visibility level fix
2015-07-06 17:40:33 +03:00