The code powering m.abunchtell.com https://m.abunchtell.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

23 行
726 B

  1. require 'rails_helper'
  2. describe SharesController do
  3. render_views
  4. let(:user) { Fabricate(:user) }
  5. before { sign_in user }
  6. describe 'GTE #show' do
  7. subject(:initial_state_json) { JSON.parse(assigns(:initial_state_json), symbolize_names: true) }
  8. subject(:body_classes) { assigns(:body_classes) }
  9. before { get :show, params: { title: 'test title', text: 'test text', url: 'url1 url2' } }
  10. it 'assigns json' do
  11. expect(response).to have_http_status :ok
  12. expect(initial_state_json[:compose][:text]).to eq 'test title test text url1 url2'
  13. expect(initial_state_json[:meta][:me]).to eq user.account.id.to_s
  14. expect(body_classes).to eq 'modal-layout compose-standalone'
  15. end
  16. end
  17. end