]>
cat aescling's git repositories - mastodon.git/blob - spec/controllers/well_known/nodeinfo_controller_spec.rb
3 describe WellKnown
::NodeInfoController, type
: :controller do
6 describe
'GET #index' do
7 it
'returns json document pointing to node info' do
10 expect(response
).to
have_http_status(200)
11 expect(response
.content_type
).to eq
'application/json'
15 expect(json
[:links]).to be_an Array
16 expect(json
[:links][0][:rel]).to eq
'http://nodeinfo.diaspora.software/ns/schema/2.0'
17 expect(json
[:links][0][:href]).to
include 'nodeinfo/2.0'
21 describe
'GET #show' do
22 it
'returns json document with node info properties' do
25 expect(response
).to
have_http_status(200)
26 expect(response
.content_type
).to eq
'application/json'
30 expect(json
[:version]).to eq
'2.0'
31 expect(json
[:usage]).to be_a Hash
32 expect(json
[:software]).to be_a Hash
33 expect(json
[:protocols]).to be_an Array
This page took 0.097373 seconds and 6 git commands to generate.