discourse/plugins/chat/spec
Loïc Guitaut 885ab9a015
DEV: Introduce an `array` type for Chat contracts (#22278)
This small patch registers a new `ActiveModel` type: `array`.
It will split a string on `,` to create a new array. If the value is
already an array, nothing will happen and for all other types, it will
wrap the value in an array.

Here’s an example on an existing contract:
```ruby
  attribute :target_usernames

  before_validation do
    self.target_usernames =
      (
        if target_usernames.is_a?(String)
          target_usernames.split(",")
        else
          target_usernames
        end
      )
  end

  # can be rewritten as:

  attribute :target_usernames, :array
```
2023-06-27 10:51:58 +10:00
..
components/chat FEATURE: Thread indicator improvements and participants (#21909) 2023-06-15 10:49:27 +10:00
fabricators FEATURE: Thread indicator improvements and participants (#21909) 2023-06-15 10:49:27 +10:00
integration DEV: Update chat cooked quote spec (#22202) 2023-06-20 10:30:33 +08:00
jobs DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
lib DEV: Introduce an `array` type for Chat contracts (#22278) 2023-06-27 10:51:58 +10:00
mailers DEV: fix and enable flaky specs (#21753) 2023-05-30 14:25:14 +04:00
models DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
queries/chat DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
requests FEATURE: Export chat messages to CSV file (#22113) 2023-06-21 16:13:36 +04:00
serializer DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
services DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
support DEV: Fix plugin:spec task return code (#21661) 2023-05-19 16:17:02 +02:00
system DEV: Skip flaky chat system tests (#22275) 2023-06-26 16:52:09 +08:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb FEATURE: Allow users to manually track threads without replying (#22100) 2023-06-16 12:08:26 +10:00
plugin_spec.rb UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00