logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

about_controller_spec.rb (1361B)


  1. require 'rails_helper'
  2. RSpec.describe AboutController, type: :controller do
  3. render_views
  4. describe 'GET #show' do
  5. before do
  6. get :show
  7. end
  8. it 'assigns @body_classes' do
  9. expect(assigns(:body_classes)).to eq 'about-body'
  10. end
  11. it 'assigns @instance_presenter' do
  12. expect(assigns(:instance_presenter)).to be_kind_of InstancePresenter
  13. end
  14. it 'returns http success' do
  15. expect(response).to have_http_status(:success)
  16. end
  17. end
  18. describe 'GET #more' do
  19. before do
  20. get :more
  21. end
  22. it 'assigns @body_classes' do
  23. expect(assigns(:body_classes)).to eq 'about-body'
  24. end
  25. it 'assigns @instance_presenter' do
  26. expect(assigns(:instance_presenter)).to be_kind_of InstancePresenter
  27. end
  28. it 'returns http success' do
  29. expect(response).to have_http_status(:success)
  30. end
  31. end
  32. describe 'GET #terms' do
  33. before do
  34. get :terms
  35. end
  36. it 'assigns @body_classes' do
  37. expect(assigns(:body_classes)).to eq 'about-body'
  38. end
  39. it 'returns http success' do
  40. expect(response).to have_http_status(:success)
  41. end
  42. end
  43. describe 'helper_method :new_user' do
  44. it 'returns a new User' do
  45. user = @controller.view_context.new_user
  46. expect(user).to be_kind_of User
  47. expect(user.account).to be_kind_of Account
  48. end
  49. end
  50. end