2019-07-17 18:07:10 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe BackupRestore::Backuper do
|
|
|
|
it 'returns a non-empty parameterized title when site title contains unicode' do
|
|
|
|
SiteSetting.title = 'Ɣ'
|
2019-07-18 16:49:16 -05:00
|
|
|
backuper = BackupRestore::Backuper.new(Discourse.system_user.id)
|
2019-07-17 18:07:10 -05:00
|
|
|
|
|
|
|
expect(backuper.send(:get_parameterized_title)).to eq("discourse")
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns a valid parameterized site title' do
|
|
|
|
SiteSetting.title = "Coding Horror"
|
2019-07-18 16:49:16 -05:00
|
|
|
backuper = BackupRestore::Backuper.new(Discourse.system_user.id)
|
2019-07-17 18:07:10 -05:00
|
|
|
|
|
|
|
expect(backuper.send(:get_parameterized_title)).to eq("coding-horror")
|
|
|
|
end
|
|
|
|
end
|