-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b5b8f8
commit 61cb9ee
Showing
5 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="d-flex justify-content-center"> | ||
<div class="col-lg-10"> | ||
<div class="card leagues mb-4"> | ||
<div class="card-header header-text"> | ||
Public Leagues | ||
</div> | ||
<ul class="list-group list-group-flush leagues-list"> | ||
<% @leagues.each do |league| %> | ||
<li class="list-group-item public-league"> | ||
<div class="caption-text text-primary"> | ||
Denver, Colorado | ||
</div> | ||
<span class="stat-line"> | ||
<%= league.name %> | ||
</span> | ||
<div class="caption-text text-info"> | ||
<%= league.public_league_stats %> | ||
</div> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
require 'rails_helper' | ||
|
||
describe 'Visitor can view league#index', type: :feature do | ||
describe 'as a visitor' | ||
describe 'as a visitor' do | ||
let!(:public_league) { create(:league, privated: false) } | ||
|
||
it 'should show the details for a public leagues and details for private leagues' do | ||
visit leagues_path | ||
|
||
within('.public-league') do | ||
expect(page).to have_content public_league.name | ||
expect(page).to have_content public_league.games_count | ||
expect(page).to have_content public_league.average_players_per_game | ||
end | ||
end | ||
end | ||
end |