Skip to content

Commit

Permalink
Merge pull request #3534 from hennevogel/bugfix/flickering-spec
Browse files Browse the repository at this point in the history
Remove superflous spec for User.registered/attended
  • Loading branch information
hennevogel authored Dec 9, 2024
2 parents c78733a + 50d6f5b commit 4510bdc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
1 change: 0 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ def get_roles
end

def registered
registrations = self.registrations
if registrations.count == 0
'None'
else
Expand Down
38 changes: 0 additions & 38 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,44 +305,6 @@
end
end

describe '#registered' do
context 'user has not registered to any conference' do
it 'returns None' do
expect(user.registered).to eq 'None'
end
end

context 'user has registered to conferences' do
before do
create(:registration, user: user, conference: conference)
create(:registration, user: user, conference: conference2)
end

it 'returns registered conferences title' do
expect(user.registered).to eq('openSUSE Conference 2016, openSUSE Conference 2015')
end
end
end

describe '#attended' do
context 'user has not attended any conference' do
it 'returns None' do
expect(user.attended).to eq 'None'
end
end

context 'user has attended conferences' do
before do
create(:registration, user: user, conference: conference, attended: true)
create(:registration, user: user, conference: conference2, attended: true)
end

it 'returns attended conferences title' do
expect(user.attended).to eq('openSUSE Conference 2016, openSUSE Conference 2015')
end
end
end

describe '#confirmed?' do
context 'confirmed user' do
it 'returns true' do
Expand Down

0 comments on commit 4510bdc

Please sign in to comment.