3 describe SharesController
do
6 let(:user) { Fabricate(:user) }
7 before
{ sign_in user
}
9 describe
'GTE #show' do
10 subject(:initial_state_json) { JSON
.parse(assigns(:initial_state_json), symbolize_names
: true) }
11 subject(:body_classes) { assigns(:body_classes) }
13 before
{ get
:show, params
: { title
: 'test title', text
: 'test text', url
: 'url1 url2' } }
16 expect(response
).to have_http_status
:ok
17 expect(initial_state_json
[:compose][:text]).to eq
'test title test text url1 url2'
18 expect(initial_state_json
[:meta][:me]).to eq user
.account
.id
.to_s
19 expect(body_classes
).to eq
'modal-layout compose-standalone'