Skip to content

Commit

Permalink
Fix event description test- #379
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Metzenthin committed Feb 1, 2018
1 parent 68be4b6 commit 1d9cceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def human_game_mode
end

def build_description_string
if self.type == 'RankingList'
if self.type == 'Rankinglist'
"#{I18n.t('events.index.registration_until')}: #{self.deadline} <br> #{I18n.t('events.index.start_date')}: #{self.startdate}"
else
"#{I18n.t('events.index.max_players')}: #{self.max_teams}"
Expand Down
1 change: 1 addition & 0 deletions spec/models/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@

it "should return correct description text" do
event = FactoryBot.create :rankinglist
event.deadline = Date.current
expect(event.build_description_string.include? "#{ event.deadline }").to be(true)
end
end

0 comments on commit 1d9cceb

Please sign in to comment.