Skip to content

Commit

Permalink
Improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth committed Feb 5, 2021
1 parent 7bfb260 commit 6aae4f7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/home/dashboard.html+mobile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<%= render 'users' %>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
resources :activities, only: :create
resources :jitsi_calls, only: :create

get '/chat', to: 'home#chat', as: 'chat'
get 'chat', to: 'home#chat'
end
22 changes: 22 additions & 0 deletions spec/requests/chat_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'rails_helper'

RSpec.describe 'Chat', type: :request do
let(:user) { FactoryBot.create :user }

describe 'GET chat/' do
context 'when signed in' do
it 'returns http success' do
sign_in user
get chat_path
expect(response).to have_http_status(:success)
end
end

context 'when not signed in' do
it 'returns http success' do
get chat_path
expect(response).to have_http_status(:success)
end
end
end
end

0 comments on commit 6aae4f7

Please sign in to comment.