summaryrefslogtreecommitdiff
path: root/spec/models/broadcast_message_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Set 2 weeks as the expiration time for the current broadcast messageDouglas Barbosa Alexandre2019-06-251-3/+3
|
* Remove some deprecated codedz-cleanup-deprecated-codeDmitriy Zaporozhets2019-06-071-8/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Does not exclude message_html from attributesDouglas Barbosa Alexandre2019-03-201-0/+6
|
* Refactor BroadcastMessage to use Gitlab::JsonCacheDouglas Barbosa Alexandre2018-12-191-22/+1
|
* Avoid caching BroadcastMessage as an ActiveRecord objectStan Hu2018-12-081-1/+36
| | | | | | | | | | | | When a Rails 4 host serializes a BroadcastMessage, it will serialize `ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer`, which does not exist in Rails 5. This will cause Error 500s on a Rails 5 reading from this cache. To make Rails 4 and 5 play well together, store the data as JSON and construct the ActiveRecord objects from JSON. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55034
* Backport: Propagate broadcast messages to secondariesMichael Kozono2018-04-111-1/+5
|
* Fix caching of future broadcast messagesfix-broadcast-message-cachingYorick Peterse2017-08-211-0/+23
| | | | | | | | | This changes the caching mechanism so we cache both current _and_ future broadcast messages, then manually filter out those we don't want to display. This ensures we don't need any additional queries while still being able to display the right messages at the right time. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36661
* Better caching and indexing of broadcast messagesYorick Peterse2017-08-111-1/+19
| | | | | | | | | | | | | | | | | Caching of BroadcastMessage instances has been changed so a cache stays valid as long as the default cache expiration time permits, instead of the cache being expired after 1 minute. When modifying broadcast messages the cache is flushed automatically. To remove the need for performing sequence scans on the "broadcast_messages" table we also add an index on (starts_at, ends_at, id), permitting PostgreSQL to use an index scan to get all necessary data. Finally this commit adds a few NOT NULL constraints to the table to match the Rails validations. Fixes gitlab-org/gitlab-ce#31706
* Use described_class when possibleRémy Coutable2017-07-271-4/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* #13336 - display multiple messages in both the UI and git outputMike Ricketts2017-06-151-6/+13
|
* Use build instead create in BroadcastMessage model specSemyon Pupkov2016-11-191-1/+1
|
* Now we already included it in spec_helper.rbwall-clock-time-for-showing-pipelineLin Jen-Shin2016-08-201-2/+0
|
* adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-3/+3
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-14/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 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
* Move `BroadcastMessage#status` to a helper since it's presentationalRobert Speicher2016-01-131-20/+0
|
* Update BroadcastMessage modelRobert Speicher2016-01-131-5/+86
| | | | | - Adds default values for `color` and `font` attributes - Adds `active?`, `started?`, `ended?`, and 'status' methods
* Remove alert_type attribute from BroadcastMessageRobert Speicher2016-01-131-1/+0
|
* Tag model specsDouwe Maan2015-12-091-1/+1
|
* Add custom ColorValidatorRobert Speicher2015-12-071-0/+15
|
* Fix rubocop warnings in spec/modelsGuilherme Garnier2015-10-031-2/+2
|
* Updated rspec to rspec 3.x syntaxJeroen van Baarsen2015-02-121-4/+4
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Re-annotate modelsDmitriy Zaporozhets2014-04-091-3/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Customization and previewing of broadcast messagesAndrew Tomaka2013-12-181-0/+2
|
* AnnotateDmitriy Zaporozhets2013-11-131-0/+13
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Show broadcast message to usersDmitriy Zaporozhets2013-11-121-0/+17
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Broadcast message model + migrationsDmitriy Zaporozhets2013-11-121-0/+7
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>