Commit Graph

14 Commits

Author SHA1 Message Date
Bob Van Landuyt 1de47ee373 Use namespace#path for building urls in specs
Some of the specs were using namespace names instead of paths for
building URLS. This would fail since we now build a namespace with a
user's name instead of a user's username.
2019-07-09 18:09:45 +02:00
Thong Kuah 85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12:00
Douwe Maan e0054a9ab1 Revert "Merge branch 'blackst0ne-update-push-new-merge-request-url' into 'master'"
This reverts merge request !22526
2018-11-07 13:32:20 +00:00
blackst0ne e211ef4e9d Make new merge request URL more friendly when pushing code 2018-10-23 12:00:28 +11:00
Bob Van Landuyt e8ca579d88 Add a project forks spec helper
The helper creates a fork of a project with all provided attributes,
but skipping the creation of the repository on disk.
2017-10-07 11:46:23 +02:00
Lin Jen-Shin ae7c52a060 Fix more tests 2017-08-11 17:54:34 +08:00
Yorick Peterse 6ef87a2083
Merge issuable "reopened" state into "opened"
Having two states that essentially mean the same thing is very much like
having a boolean "true" and boolean "mostly-true": it's rather silly.
This commit merges the "reopened" state into the "opened" state while
taking care of system notes still showing messages along the lines of
"Alice reopened this issue".

A big benefit from having only two states (opened and closed) is that
indexing and querying becomes simpler and more performant. For example,
to get all the opened queries we no longer have to query both states:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state IN ('opened', 'reopened');

Instead we can query a single state directly, which can be much faster:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state = 'opened';

Further, only having two states makes indexing easier as we will only
ever filter (and thus scan an index) using a single value. Partial
indexes could help but aren't supported on MySQL, complicating the
development process and not being helpful for MySQL.
2017-07-28 13:31:51 +02:00
Robert Speicher d49768296c Auto-correct `RSpec/DescribedClass` violations 2017-05-01 11:13:33 -04:00
Robert Speicher ca9a79f620 Use `:empty_project` where possible in service specs 2017-03-27 20:44:09 -04:00
Alex Sanford 68e3fa0e58 Add ability to disable Merge Request URL on push 2017-03-17 12:35:39 +00:00
Lin Jen-Shin 9c4e0d6445 Use `Gitlab.config.gitlab.host` over `'localhost'`
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
2016-11-18 20:17:10 +08:00
Felipe Artur 892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00
Douwe Maan 8779da4503 Don't show new MR URL after push when it doesn't make sense 2016-08-12 17:51:54 -05:00
Scott Le 6109daf480 api for generating new merge request
DRY code + fix rubocop

Add more test cases

Append to changelog

DRY changes list

find_url service for merge_requests

use GET for getting merge request links

remove files

rename to get_url_service

reduce loop

add test case for cross project

refactor tiny thing

update changelog
2016-08-11 23:37:00 +07:00