0001-Update-default-database-config-for-MySQL.patch

Marius BALTEANU, 2019-09-03 09:17

Download (2.32 KB)

View differences:

config/database.yml.example
1
# Default setup is given for MySQL with ruby1.9.
1
# Default setup is given for MySQL 5.7 with ruby2.2.
2 2
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
3 3
# Line indentation must be 2 spaces (no tabs).
4 4

  
......
8 8
  host: localhost
9 9
  username: root
10 10
  password: ""
11
  encoding: utf8
11
  # Remove encoding for existing installation on MySQL
12
  encoding: utf8mb4
12 13

  
13 14
development:
14 15
  adapter: mysql2
......
16 17
  host: localhost
17 18
  username: root
18 19
  password: ""
19
  encoding: utf8
20
  # Remove encoding for existing installation on MySQL
21
  encoding: utf8mb4
20 22

  
21 23
# Warning: The database defined as "test" will be erased and
22 24
# re-generated from your development database when you run "rake".
......
27 29
  host: localhost
28 30
  username: root
29 31
  password: ""
30
  encoding: utf8
32
  # Remove encoding for existing installation on MySQL
33
  encoding: utf8mb4
31 34

  
32 35
# PostgreSQL configuration example
33 36
#production:
test/unit/issue_test.rb
218 218
    assert_equal issues.collect(&:id).sort, Issue.all.select {|issue| issue.visible?(user)}.collect(&:id).sort
219 219
  end
220 220

  
221
  def test_create_with_emoji_character
222
    set_language_if_valid 'en'
223
    issue = Issue.new(:project_id => 1, :tracker_id => 1,
224
                      :author_id => 1, :subject => 'Group assignment',
225
                      :description => 'Hello 😀')
226
    assert issue.save
227

  
228
    assert_equal 'Hello 😀', issue.description
229
  end
230

  
221 231
  def test_visible_scope_for_anonymous
222 232
    # Anonymous user should see issues of public projects only
223 233
    issues = Issue.visible(User.anonymous).to_a
224
-