Commit Graph

10 Commits

Author SHA1 Message Date
Lin Jen-Shin 412db1874f Fix some tests and report the error message 2017-08-09 21:41:45 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Robert Speicher 939e9bdde1 Make the 'issuables list meta-data' shared example less dangerous
This shared example would take an object's database ID and create a
number of objects based on it. If for some reason the ID were a high
number, like 20, this would create `20 + 21 + 22` objects.

Not only was this dangerous from a performance perspective, it was
entirely unnecessary, as the behavior it was testing is already
well-tested in the unit test for the underlying object. For a controller
test, which is what's including this shared example, all we need to do
is verify that the assigned object contains the correct `id => object`
Hash, which is what we now test for.
2017-08-01 12:55:57 -04:00
Sean McGivern 796d65f1fe Merge branch '29492-useless-queries' into 'master'
remove useless queries with false conditions (e.g 1=0)

Closes #29492

See merge request !10141
2017-04-04 13:33:42 +00:00
mhasbini e52b1df1d5 Remove useless queries with false conditions (e.g 1=0) 2017-04-04 13:54:58 +03:00
Rémy Coutable 4e3516788f Don't use FFaker in factories, use sequences instead
FFaker can generate data that randomly break our test suite. This
simplifies our factories and use sequences which are more predictive.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00
Douwe Maan ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Douwe Maan 5c7f9d69e3 Fix code for cops 2017-02-23 09:31:57 -06:00
Douwe Maan 8a4d68c53e Enable Style/ConditionalAssignment 2017-02-23 09:31:57 -06:00
Felipe Artur 0b14b654b6 Gather issuable metadata to avoid n+ queries on index view 2017-02-09 17:40:37 -02:00