Commit Graph

16 Commits

Author SHA1 Message Date
GitLab Bot c6c7437861 Add latest changes from gitlab-org/gitlab@master 2020-03-04 12:07:52 +00:00
GitLab Bot 587794b4b8 Add latest changes from gitlab-org/gitlab@master 2019-10-02 00:06:26 +00:00
Thong Kuah 94bb660460 Add frozen_string_literal to spec/factories
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:18:39 +12:00
Semyon Pupkov 87b85ef81c Fix DynamicAttributeDefinedStatically cop 2018-09-21 12:37:57 +05:00
Rémy Coutable 4af9d592c5 Replace factory_girl_rails with factory_bot_rails
I've followed the [upgrade guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md) and ran these two commands:

```
grep -e FactoryGirl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|FactoryGirl|FactoryBot|"
grep -e factory_girl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|factory_girl|factory_bot|"
```

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-14 15:01:55 +01:00
joshbabier a92281cecb TST: Use more accurate time windows so tests do not fail
Currently, the way the 'starts_at' and 'ends_at' attributes are set,
if the specs are run at one second to midnight, the broadcast message
will expire in one second. I have changed it so that we are guaranteed
a period of one day until expiration. I believe this is the desired
behaviour and it's also consistent with the rest of the factory.

This corrects the following three specs that can fail depending upon
where and when they are run:

./spec/helpers/broadcast_messages_helper_spec.rb:42
./spec/models/broadcast_message_spec.rb:26
./spec/models/broadcast_message_spec.rb:47
2016-08-04 14:50:39 -04:00
Jeroen van Baarsen f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Douwe Maan 261569b246 Fix specs 2016-03-21 09:09:59 +01:00
Robert Speicher 6df45eb463 Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
Robert Speicher df496fcaf0 Update BroadcastMessage model
- Adds default values for `color` and `font` attributes
- Adds `active?`, `started?`, `ended?`, and 'status' methods
2016-01-13 11:34:58 -05:00
Robert Speicher 8086b2bd2e Simplify BroadcastMessage factory
Also make the feature tests less brittle.
2016-01-13 11:34:58 -05:00
Dmitriy Zaporozhets 36f861f1b1
Re-annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 15:05:03 +03:00
Dmitriy Zaporozhets 9728ae854e
Fix broadcast message factory
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-19 21:06:59 +02:00
Andrew Tomaka 0760ba3efb Customization and previewing of broadcast messages 2013-12-18 17:43:45 -05:00
Dmitriy Zaporozhets 201d489780
Annotate
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-13 14:10:03 +02:00
Dmitriy Zaporozhets f1ecf53c1e
Broadcast message model + migrations
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-12 13:47:28 +02:00