Project

General

Profile

Feature #31921 » 0001-Update-default-database-config-for-MySQL.patch

Marius BĂLTEANU, 2019-09-03 09:17

View differences:

config/database.yml.example
# Default setup is given for MySQL with ruby1.9.
# Default setup is given for MySQL 5.7 with ruby2.2.
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
# Line indentation must be 2 spaces (no tabs).
......
host: localhost
username: root
password: ""
encoding: utf8
# Remove encoding for existing installation on MySQL
encoding: utf8mb4
development:
adapter: mysql2
......
host: localhost
username: root
password: ""
encoding: utf8
# Remove encoding for existing installation on MySQL
encoding: utf8mb4
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
......
host: localhost
username: root
password: ""
encoding: utf8
# Remove encoding for existing installation on MySQL
encoding: utf8mb4
# PostgreSQL configuration example
#production:
test/unit/issue_test.rb
assert_equal issues.collect(&:id).sort, Issue.all.select {|issue| issue.visible?(user)}.collect(&:id).sort
end
def test_create_with_emoji_character
set_language_if_valid 'en'
issue = Issue.new(:project_id => 1, :tracker_id => 1,
:author_id => 1, :subject => 'Group assignment',
:description => 'Hello 😀')
assert issue.save
assert_equal 'Hello 😀', issue.description
end
def test_visible_scope_for_anonymous
# Anonymous user should see issues of public projects only
issues = Issue.visible(User.anonymous).to_a
    (1-1/1)