Skip to content

Commit

Permalink
add supporting test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdembe committed Nov 26, 2024
1 parent cb9a903 commit 2869f25
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/controllers/accounts/connected_accounts_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Accounts::ConnectedAccountsController do
describe '#show' do
let(:user) { create(:user, :fully_registered) }

before do
stub_sign_in(user) if user
end

context 'on page load' do
it 'shows and logs a visit' do
stub_analytics

get :show

expect(@analytics).to have_logged_event(:connected_accounts_page_visited)
end
end
end
end

0 comments on commit 2869f25

Please sign in to comment.