]> cat aescling's git repositories - mastodon.git/blob - spec/controllers/shares_controller_spec.rb
Export and import `hide_notifications` alongside user mutes (#10335)
[mastodon.git] / spec / controllers / shares_controller_spec.rb
1 require 'rails_helper'
2
3 describe SharesController do
4 render_views
5
6 let(:user) { Fabricate(:user) }
7 before { sign_in user }
8
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) }
12
13 before { get :show, params: { title: 'test title', text: 'test text', url: 'url1 url2' } }
14
15 it 'assigns json' do
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'
20 end
21 end
22 end
This page took 0.084119 seconds and 4 git commands to generate.