Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanylamm committed Apr 27, 2024
1 parent 90a99b7 commit bcff073
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions app/models/conference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#
# index_conferences_on_organization_id (organization_id)
#
# rubocop:disable Metrics/ClassLength
class Conference < ApplicationRecord
include RevisionCount
require 'uri'
Expand Down
35 changes: 17 additions & 18 deletions spec/features/conference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,38 +85,37 @@
it_behaves_like 'add and update conference'
end

describe 'user views' do
describe 'user views' do
let!(:conference) { create(:full_conference, description: 'Welcome to this conference!', registered_attendees_message: 'This is an exclusive message!') }
let!(:registered_user) {create(:user)}
let!(:not_registered_user) {create(:user)}
let!(:registration) {create(:registration, user: registered_user, conference: conference)}
let!(:registered_user) { create(:user) }
let!(:not_registered_user) { create(:user) }
let!(:registration) { create(:registration, user: registered_user, conference: conference) }


context 'when user is registered for conference' do
before do
context 'when user is registered for conference' do
before do
sign_in registered_user
visit conference_path(conference.short_title)
end
end

it 'shows registered attendees message and description' do
expect(page).to have_content("Welcome to this conference!")
expect(page).to have_content('Welcome to this conference!')
expect(page).to have_content('This is an exclusive message!')
end
end
end
end

context 'when user is not registered for conference' do
before do
context 'when user is not registered for conference' do
before do
sign_in not_registered_user
visit conference_path(conference)
end
end

it 'shows conference description' do
expect(page).to have_content("Welcome to this conference!")
end
expect(page).to have_content('Welcome to this conference!')
end

it 'does not show registered attendees message' do
expect(page).not_to have_content('This is an exclusive message!')
end
end
end
end
end
end

0 comments on commit bcff073

Please sign in to comment.