UX: Add og metadata for groups.

https://meta.discourse.org/t/onebox-for-groups/79155
This commit is contained in:
Maja Komel
2018-01-31 21:04:09 +01:00
committed by Guo Xiang Tan
parent 9d0807224b
commit 76a2fc3d07
3 changed files with 36 additions and 2 deletions

View File

@ -57,6 +57,24 @@ describe GroupsController do
end
end
describe '#show' do
it 'should respond to HTML' do
group.update_attribute(:bio_cooked, 'testing group bio')
get "/groups/#{group.name}.html"
expect(response.status).to eq(200)
expect(response.body).to have_tag(:meta, with: {
property: 'og:title', content: group.name
})
expect(response.body).to have_tag(:meta, with: {
property: 'og:description', content: group.bio_cooked
})
end
end
describe '#mentionable' do
it "should return the right response" do
sign_in(user)
@ -226,7 +244,7 @@ describe GroupsController do
end
end
describe "edit" do
describe "#edit" do
let(:group) { Fabricate(:group) }
context 'when user is not signed in' do