mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-06 09:03:41 +01:00
bf3cb42da7
Cherry-picked d2528b26b6
Conflicts:
- `app/serializers/initial_state_serializer.rb`:
Upstream changed stuff, we had extra attributes.
Applied upstream changes while keeping our extra attributes.
- `app/serializers/rest/instance_serializer.rb`:
Upstream actually moved that to `app/serializers/rest/v1/instance_serializer.rb`,
so updated that file by keeping our extra attributes, and took upstream's
version of `app/serializers/rest/instance_serializer.rb`.
- `spec/views/about/show.html.haml_spec.rb`:
Took upstream's version.
27 lines
1 KiB
Ruby
27 lines
1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe 'about/show.html.haml', without_verify_partial_doubles: true do
|
|
let(:commit_hash) { '8925731c9869f55780644304e4420a1998e52607' }
|
|
|
|
before do
|
|
allow(view).to receive(:site_hostname).and_return('example.com')
|
|
allow(view).to receive(:site_title).and_return('example site')
|
|
allow(view).to receive(:new_user).and_return(User.new)
|
|
allow(view).to receive(:use_seamless_external_login?).and_return(false)
|
|
allow(view).to receive(:current_account).and_return(nil)
|
|
end
|
|
|
|
it 'has valid open graph tags' do
|
|
assign(:instance_presenter, InstancePresenter.new)
|
|
render
|
|
|
|
header_tags = view.content_for(:header_tags)
|
|
|
|
expect(header_tags).to match(%r{<meta content=".+" property="og:title" />})
|
|
expect(header_tags).to match(%r{<meta content="website" property="og:type" />})
|
|
expect(header_tags).to match(%r{<meta content=".+" property="og:image" />})
|
|
expect(header_tags).to match(%r{<meta content="http://.+" property="og:url" />})
|
|
end
|
|
end
|