1
0

about_controller_spec.rb 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 @instance_presenter' do
  9. expect(assigns(:instance_presenter)).to be_kind_of InstancePresenter
  10. end
  11. it 'returns http success' do
  12. expect(response).to have_http_status(200)
  13. end
  14. end
  15. describe 'GET #more' do
  16. before do
  17. get :more
  18. end
  19. it 'assigns @instance_presenter' do
  20. expect(assigns(:instance_presenter)).to be_kind_of InstancePresenter
  21. end
  22. it 'returns http success' do
  23. expect(response).to have_http_status(200)
  24. end
  25. end
  26. describe 'GET #terms' do
  27. before do
  28. get :terms
  29. end
  30. it 'returns http success' do
  31. expect(response).to have_http_status(200)
  32. end
  33. end
  34. describe 'helper_method :new_user' do
  35. it 'returns a new User' do
  36. user = @controller.view_context.new_user
  37. expect(user).to be_kind_of User
  38. expect(user.account).to be_kind_of Account
  39. end
  40. end
  41. end