Remove empty strings (#5732)
This commit is contained in:
committed by
Yamagishi Kazutoshi
parent
3e90987c8b
commit
9dd5e329ab
@ -2,10 +2,10 @@ require 'rails_helper'
|
||||
|
||||
describe Settings::ApplicationsController do
|
||||
render_views
|
||||
|
||||
|
||||
let!(:user) { Fabricate(:user) }
|
||||
let!(:app) { Fabricate(:application, owner: user) }
|
||||
|
||||
|
||||
before do
|
||||
sign_in user, scope: :user
|
||||
end
|
||||
@ -21,7 +21,7 @@ describe Settings::ApplicationsController do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
describe 'GET #show' do
|
||||
it 'returns http success' do
|
||||
get :show, params: { id: app.id }
|
||||
@ -110,7 +110,7 @@ describe Settings::ApplicationsController do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'PATCH #update' do
|
||||
context 'success' do
|
||||
let(:opts) {
|
||||
@ -131,7 +131,7 @@ describe Settings::ApplicationsController do
|
||||
call_update
|
||||
expect(app.reload.website).to eql(opts[:website])
|
||||
end
|
||||
|
||||
|
||||
it 'redirects back to applications page' do
|
||||
expect(call_update).to redirect_to(settings_applications_path)
|
||||
end
|
||||
|
BIN
spec/fixtures/requests/attachment1.txt
vendored
BIN
spec/fixtures/requests/attachment1.txt
vendored
Binary file not shown.
BIN
spec/fixtures/requests/attachment2.txt
vendored
BIN
spec/fixtures/requests/attachment2.txt
vendored
Binary file not shown.
BIN
spec/fixtures/requests/avatar.txt
vendored
BIN
spec/fixtures/requests/avatar.txt
vendored
Binary file not shown.
14
spec/fixtures/requests/idn.txt
vendored
14
spec/fixtures/requests/idn.txt
vendored
@ -6,7 +6,7 @@ Content-Length: 38111
|
||||
Last-Modified: Wed, 20 Jul 2016 02:50:52 GMT
|
||||
Connection: keep-alive
|
||||
Accept-Ranges: bytes
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -21,16 +21,16 @@ Accept-Ranges: bytes
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/common.css"/>
|
||||
<script src="js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="js/carousel.js" type="text/javascript" charset="utf-8"></script>
|
||||
<title>中国域名网站</title>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="head-tips" id="headTip">
|
||||
@ -453,7 +453,7 @@ Accept-Ranges: bytes
|
||||
<li><a href="http://新疆农业大学.中国" target="_blank">新疆农业大学.中国</a></li>
|
||||
<li><a href="http://浙江万里学院.中国" target="_blank">浙江万里学院.中国</a></li>
|
||||
<li><a href="http://重庆大学.中国" target="_blank">重庆大学.中国</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -472,7 +472,7 @@ Accept-Ranges: bytes
|
||||
<script>
|
||||
$("#headTip").hide()
|
||||
var hostname = window.location.hostname || "";
|
||||
|
||||
|
||||
var tips = "您所访问的域名 <font size='' color='#ff0000'>" + hostname +"</font> 无法到达,您可以尝试重新访问,或使用搜索相关信息"
|
||||
if (hostname != "导航.中国") {
|
||||
$("#headTip").html(tips);
|
||||
|
@ -77,7 +77,7 @@ RSpec.describe StreamEntriesHelper, type: :helper do
|
||||
params[:controller] = StreamEntriesHelper::EMBEDDED_CONTROLLER
|
||||
params[:action] = StreamEntriesHelper::EMBEDDED_ACTION
|
||||
end
|
||||
|
||||
|
||||
describe '#style_classes' do
|
||||
it do
|
||||
status = double(reblog?: false)
|
||||
@ -202,7 +202,7 @@ RSpec.describe StreamEntriesHelper, type: :helper do
|
||||
expect(css_class).to eq 'h-cite'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe '#rtl?' do
|
||||
it 'is false if text is empty' do
|
||||
expect(helper).not_to be_rtl ''
|
||||
|
@ -62,7 +62,7 @@ describe UserSettingsDecorator do
|
||||
settings.update(values)
|
||||
expect(user.settings['auto_play_gif']).to eq false
|
||||
end
|
||||
|
||||
|
||||
it 'updates the user settings value for system font in UI' do
|
||||
values = { 'setting_system_font_ui' => '0' }
|
||||
|
||||
|
@ -35,7 +35,7 @@ RSpec.describe RemoteFollow do
|
||||
|
||||
context 'attrs with acct' do
|
||||
let(:attrs) { { acct: 'gargron@quitter.no' }}
|
||||
|
||||
|
||||
it do
|
||||
is_expected.to be true
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ RSpec.describe ActivityPub::FetchRemoteStatusService do
|
||||
|
||||
it 'creates status' do
|
||||
status = sender.statuses.first
|
||||
|
||||
|
||||
expect(status).to_not be_nil
|
||||
expect(status.text).to eq 'Lorem ipsum'
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ RSpec::Matchers.define :model_have_error_on_field do |expected|
|
||||
|
||||
failure_message do |record|
|
||||
keys = record.errors.keys
|
||||
|
||||
|
||||
"expect record.errors(#{keys}) to include #{expected}"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user