summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/brackets.js.coffee3
-rw-r--r--app/assets/stylesheets/brackets.css.scss3
-rw-r--r--app/controllers/brackets_controller.rb74
-rw-r--r--app/helpers/brackets_helper.rb2
-rw-r--r--app/models/bracket.rb4
-rw-r--r--app/models/bracket_match.rb5
-rw-r--r--app/views/brackets/_form.html.erb29
-rw-r--r--app/views/brackets/edit.html.erb6
-rw-r--r--app/views/brackets/index.html.erb31
-rw-r--r--app/views/brackets/index.json.jbuilder4
-rw-r--r--app/views/brackets/new.html.erb5
-rw-r--r--app/views/brackets/show.html.erb19
-rw-r--r--app/views/brackets/show.json.jbuilder1
-rw-r--r--config/routes.rb2
-rw-r--r--db/migrate/20140410173725_create_simple_captcha_data.rb (renamed from db/migrate/20140407041416_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140410213731_create_delayed_jobs.rb (renamed from db/migrate/20140407081419_create_delayed_jobs.rb)0
-rw-r--r--db/migrate/20140410213738_create_servers.rb (renamed from db/migrate/20140407081422_create_servers.rb)0
-rw-r--r--db/migrate/20140410213745_create_matches.rb (renamed from db/migrate/20140407081425_create_matches.rb)0
-rw-r--r--db/migrate/20140410213752_create_teams.rb (renamed from db/migrate/20140407081427_create_teams.rb)0
-rw-r--r--db/migrate/20140410213758_create_alerts.rb (renamed from db/migrate/20140407081430_create_alerts.rb)0
-rw-r--r--db/migrate/20140410213805_create_pms.rb (renamed from db/migrate/20140407081434_create_pms.rb)0
-rw-r--r--db/migrate/20140410213811_create_tournaments.rb (renamed from db/migrate/20140407081437_create_tournaments.rb)0
-rw-r--r--db/migrate/20140410213818_create_games.rb (renamed from db/migrate/20140407081440_create_games.rb)0
-rw-r--r--db/migrate/20140410213824_create_users.rb (renamed from db/migrate/20140407081443_create_users.rb)0
-rw-r--r--db/migrate/20140410213831_create_sessions.rb (renamed from db/migrate/20140407081446_create_sessions.rb)0
-rw-r--r--db/migrate/20140410213838_create_brackets.rb11
-rw-r--r--db/migrate/20140410213844_create_server_settings.rb (renamed from db/migrate/20140407081449_create_server_settings.rb)0
-rw-r--r--db/migrate/20140410213851_create_game_settings.rb (renamed from db/migrate/20140407081452_create_game_settings.rb)0
-rw-r--r--db/migrate/20140410213857_create_tournament_preferences.rb (renamed from db/migrate/20140407081454_create_tournament_preferences.rb)0
-rw-r--r--db/migrate/20140410213903_create_scores.rb (renamed from db/migrate/20140407081458_create_scores.rb)0
-rw-r--r--db/migrate/20140410213909_create_remote_usernames.rb (renamed from db/migrate/20140407081501_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140410213916_create_bracket_matches.rb11
-rw-r--r--db/migrate/20140410213922_create_tournament_players_join_table.rb (renamed from db/migrate/20140407081503_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140410213928_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140407081506_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140410213935_create_team_user_join_table.rb (renamed from db/migrate/20140407081509_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140410213941_create_match_team_join_table.rb (renamed from db/migrate/20140407081512_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140410214006_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140407081524_add_hidden_attrs_to_user.rb)0
-rw-r--r--db/schema.rb25
-rw-r--r--test/controllers/brackets_controller_test.rb49
-rw-r--r--test/fixtures/bracket_matches.yml11
-rw-r--r--test/fixtures/brackets.yml11
-rw-r--r--test/helpers/brackets_helper_test.rb4
-rw-r--r--test/models/bracket_match_test.rb7
-rw-r--r--test/models/bracket_test.rb7
44 files changed, 323 insertions, 1 deletions
diff --git a/app/assets/javascripts/brackets.js.coffee b/app/assets/javascripts/brackets.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/brackets.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/brackets.css.scss b/app/assets/stylesheets/brackets.css.scss
new file mode 100644
index 0000000..481e6e6
--- /dev/null
+++ b/app/assets/stylesheets/brackets.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the brackets controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/brackets_controller.rb b/app/controllers/brackets_controller.rb
new file mode 100644
index 0000000..fe43ca9
--- /dev/null
+++ b/app/controllers/brackets_controller.rb
@@ -0,0 +1,74 @@
+class BracketsController < ApplicationController
+ before_action :set_bracket, only: [:show, :edit, :update, :destroy]
+
+ # GET /brackets
+ # GET /brackets.json
+ def index
+ @brackets = Bracket.all
+ end
+
+ # GET /brackets/1
+ # GET /brackets/1.json
+ def show
+ end
+
+ # GET /brackets/new
+ def new
+ @bracket = Bracket.new
+ end
+
+ # GET /brackets/1/edit
+ def edit
+ end
+
+ # POST /brackets
+ # POST /brackets.json
+ def create
+ @bracket = Bracket.new(bracket_params)
+
+ respond_to do |format|
+ if @bracket.save
+ format.html { redirect_to @bracket, notice: 'Bracket was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @bracket }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @bracket.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /brackets/1
+ # PATCH/PUT /brackets/1.json
+ def update
+ respond_to do |format|
+ if @bracket.update(bracket_params)
+ format.html { redirect_to @bracket, notice: 'Bracket was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @bracket.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /brackets/1
+ # DELETE /brackets/1.json
+ def destroy
+ @bracket.destroy
+ respond_to do |format|
+ format.html { redirect_to brackets_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_bracket
+ @bracket = Bracket.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def bracket_params
+ params.require(:bracket).permit(:user_id, :tournament_id, :name)
+ end
+end
diff --git a/app/helpers/brackets_helper.rb b/app/helpers/brackets_helper.rb
new file mode 100644
index 0000000..8c380fd
--- /dev/null
+++ b/app/helpers/brackets_helper.rb
@@ -0,0 +1,2 @@
+module BracketsHelper
+end
diff --git a/app/models/bracket.rb b/app/models/bracket.rb
new file mode 100644
index 0000000..e8d9c5a
--- /dev/null
+++ b/app/models/bracket.rb
@@ -0,0 +1,4 @@
+class Bracket < ActiveRecord::Base
+ belongs_to :user
+ belongs_to :tournament
+end
diff --git a/app/models/bracket_match.rb b/app/models/bracket_match.rb
new file mode 100644
index 0000000..823bc40
--- /dev/null
+++ b/app/models/bracket_match.rb
@@ -0,0 +1,5 @@
+class BracketMatch < ActiveRecord::Base
+ belongs_to :bracket
+ belongs_to :match
+ belongs_to :predicted_winner
+end
diff --git a/app/views/brackets/_form.html.erb b/app/views/brackets/_form.html.erb
new file mode 100644
index 0000000..5050fc1
--- /dev/null
+++ b/app/views/brackets/_form.html.erb
@@ -0,0 +1,29 @@
+<%= form_for(@bracket) do |f| %>
+ <% if @bracket.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@bracket.errors.count, "error") %> prohibited this bracket from being saved:</h2>
+
+ <ul>
+ <% @bracket.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :user_id %><br>
+ <%= f.text_field :user_id %>
+ </div>
+ <div class="field">
+ <%= f.label :tournament_id %><br>
+ <%= f.text_field :tournament_id %>
+ </div>
+ <div class="field">
+ <%= f.label :name %><br>
+ <%= f.text_field :name %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/brackets/edit.html.erb b/app/views/brackets/edit.html.erb
new file mode 100644
index 0000000..10a2b3e
--- /dev/null
+++ b/app/views/brackets/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing bracket</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @bracket %> |
+<%= link_to 'Back', brackets_path %>
diff --git a/app/views/brackets/index.html.erb b/app/views/brackets/index.html.erb
new file mode 100644
index 0000000..2195d69
--- /dev/null
+++ b/app/views/brackets/index.html.erb
@@ -0,0 +1,31 @@
+<h1>Listing brackets</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>User</th>
+ <th>Tournament</th>
+ <th>Name</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @brackets.each do |bracket| %>
+ <tr>
+ <td><%= bracket.user %></td>
+ <td><%= bracket.tournament %></td>
+ <td><%= bracket.name %></td>
+ <td><%= link_to 'Show', bracket %></td>
+ <td><%= link_to 'Edit', edit_bracket_path(bracket) %></td>
+ <td><%= link_to 'Destroy', bracket, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Bracket', new_bracket_path %>
diff --git a/app/views/brackets/index.json.jbuilder b/app/views/brackets/index.json.jbuilder
new file mode 100644
index 0000000..8a66626
--- /dev/null
+++ b/app/views/brackets/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@brackets) do |bracket|
+ json.extract! bracket, :id, :user_id, :tournament_id, :name
+ json.url bracket_url(bracket, format: :json)
+end
diff --git a/app/views/brackets/new.html.erb b/app/views/brackets/new.html.erb
new file mode 100644
index 0000000..c379c15
--- /dev/null
+++ b/app/views/brackets/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New bracket</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', brackets_path %>
diff --git a/app/views/brackets/show.html.erb b/app/views/brackets/show.html.erb
new file mode 100644
index 0000000..9c7c14b
--- /dev/null
+++ b/app/views/brackets/show.html.erb
@@ -0,0 +1,19 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <strong>User:</strong>
+ <%= @bracket.user %>
+</p>
+
+<p>
+ <strong>Tournament:</strong>
+ <%= @bracket.tournament %>
+</p>
+
+<p>
+ <strong>Name:</strong>
+ <%= @bracket.name %>
+</p>
+
+<%= link_to 'Edit', edit_bracket_path(@bracket) %> |
+<%= link_to 'Back', brackets_path %>
diff --git a/app/views/brackets/show.json.jbuilder b/app/views/brackets/show.json.jbuilder
new file mode 100644
index 0000000..6a8d478
--- /dev/null
+++ b/app/views/brackets/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @bracket, :id, :user_id, :tournament_id, :name, :created_at, :updated_at
diff --git a/config/routes.rb b/config/routes.rb
index 97e82f8..fe92ba5 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,6 @@
Leaguer::Application.routes.draw do
+ resources :brackets
+
resources :sessions
resources :users
diff --git a/db/migrate/20140407041416_create_simple_captcha_data.rb b/db/migrate/20140410173725_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140407041416_create_simple_captcha_data.rb
+++ b/db/migrate/20140410173725_create_simple_captcha_data.rb
diff --git a/db/migrate/20140407081419_create_delayed_jobs.rb b/db/migrate/20140410213731_create_delayed_jobs.rb
index ec0dd93..ec0dd93 100644
--- a/db/migrate/20140407081419_create_delayed_jobs.rb
+++ b/db/migrate/20140410213731_create_delayed_jobs.rb
diff --git a/db/migrate/20140407081422_create_servers.rb b/db/migrate/20140410213738_create_servers.rb
index fbe1b02..fbe1b02 100644
--- a/db/migrate/20140407081422_create_servers.rb
+++ b/db/migrate/20140410213738_create_servers.rb
diff --git a/db/migrate/20140407081425_create_matches.rb b/db/migrate/20140410213745_create_matches.rb
index bdeb1cd..bdeb1cd 100644
--- a/db/migrate/20140407081425_create_matches.rb
+++ b/db/migrate/20140410213745_create_matches.rb
diff --git a/db/migrate/20140407081427_create_teams.rb b/db/migrate/20140410213752_create_teams.rb
index fdf9a68..fdf9a68 100644
--- a/db/migrate/20140407081427_create_teams.rb
+++ b/db/migrate/20140410213752_create_teams.rb
diff --git a/db/migrate/20140407081430_create_alerts.rb b/db/migrate/20140410213758_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140407081430_create_alerts.rb
+++ b/db/migrate/20140410213758_create_alerts.rb
diff --git a/db/migrate/20140407081434_create_pms.rb b/db/migrate/20140410213805_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140407081434_create_pms.rb
+++ b/db/migrate/20140410213805_create_pms.rb
diff --git a/db/migrate/20140407081437_create_tournaments.rb b/db/migrate/20140410213811_create_tournaments.rb
index c0d8929..c0d8929 100644
--- a/db/migrate/20140407081437_create_tournaments.rb
+++ b/db/migrate/20140410213811_create_tournaments.rb
diff --git a/db/migrate/20140407081440_create_games.rb b/db/migrate/20140410213818_create_games.rb
index 5e4f56f..5e4f56f 100644
--- a/db/migrate/20140407081440_create_games.rb
+++ b/db/migrate/20140410213818_create_games.rb
diff --git a/db/migrate/20140407081443_create_users.rb b/db/migrate/20140410213824_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140407081443_create_users.rb
+++ b/db/migrate/20140410213824_create_users.rb
diff --git a/db/migrate/20140407081446_create_sessions.rb b/db/migrate/20140410213831_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140407081446_create_sessions.rb
+++ b/db/migrate/20140410213831_create_sessions.rb
diff --git a/db/migrate/20140410213838_create_brackets.rb b/db/migrate/20140410213838_create_brackets.rb
new file mode 100644
index 0000000..8813bf2
--- /dev/null
+++ b/db/migrate/20140410213838_create_brackets.rb
@@ -0,0 +1,11 @@
+class CreateBrackets < ActiveRecord::Migration
+ def change
+ create_table :brackets do |t|
+ t.references :user, index: true
+ t.references :tournament, index: true
+ t.string :name
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140407081449_create_server_settings.rb b/db/migrate/20140410213844_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140407081449_create_server_settings.rb
+++ b/db/migrate/20140410213844_create_server_settings.rb
diff --git a/db/migrate/20140407081452_create_game_settings.rb b/db/migrate/20140410213851_create_game_settings.rb
index b1caf5d..b1caf5d 100644
--- a/db/migrate/20140407081452_create_game_settings.rb
+++ b/db/migrate/20140410213851_create_game_settings.rb
diff --git a/db/migrate/20140407081454_create_tournament_preferences.rb b/db/migrate/20140410213857_create_tournament_preferences.rb
index 991d659..991d659 100644
--- a/db/migrate/20140407081454_create_tournament_preferences.rb
+++ b/db/migrate/20140410213857_create_tournament_preferences.rb
diff --git a/db/migrate/20140407081458_create_scores.rb b/db/migrate/20140410213903_create_scores.rb
index 4ca0b0b..4ca0b0b 100644
--- a/db/migrate/20140407081458_create_scores.rb
+++ b/db/migrate/20140410213903_create_scores.rb
diff --git a/db/migrate/20140407081501_create_remote_usernames.rb b/db/migrate/20140410213909_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140407081501_create_remote_usernames.rb
+++ b/db/migrate/20140410213909_create_remote_usernames.rb
diff --git a/db/migrate/20140410213916_create_bracket_matches.rb b/db/migrate/20140410213916_create_bracket_matches.rb
new file mode 100644
index 0000000..3323e31
--- /dev/null
+++ b/db/migrate/20140410213916_create_bracket_matches.rb
@@ -0,0 +1,11 @@
+class CreateBracketMatches < ActiveRecord::Migration
+ def change
+ create_table :bracket_matches do |t|
+ t.references :bracket, index: true
+ t.references :match, index: true
+ t.references :predicted_winner, index: true
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140407081503_create_tournament_players_join_table.rb b/db/migrate/20140410213922_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140407081503_create_tournament_players_join_table.rb
+++ b/db/migrate/20140410213922_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140407081506_create_tournament_hosts_join_table.rb b/db/migrate/20140410213928_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140407081506_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140410213928_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140407081509_create_team_user_join_table.rb b/db/migrate/20140410213935_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140407081509_create_team_user_join_table.rb
+++ b/db/migrate/20140410213935_create_team_user_join_table.rb
diff --git a/db/migrate/20140407081512_create_match_team_join_table.rb b/db/migrate/20140410213941_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140407081512_create_match_team_join_table.rb
+++ b/db/migrate/20140410213941_create_match_team_join_table.rb
diff --git a/db/migrate/20140407081524_add_hidden_attrs_to_user.rb b/db/migrate/20140410214006_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140407081524_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140410214006_add_hidden_attrs_to_user.rb
diff --git a/db/schema.rb b/db/schema.rb
index 9214da8..e6ad821 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140407081524) do
+ActiveRecord::Schema.define(version: 20140410214006) do
create_table "alerts", force: true do |t|
t.integer "author_id"
@@ -22,6 +22,29 @@ ActiveRecord::Schema.define(version: 20140407081524) do
add_index "alerts", ["author_id"], name: "index_alerts_on_author_id"
+ create_table "bracket_matches", force: true do |t|
+ t.integer "bracket_id"
+ t.integer "match_id"
+ t.integer "predicted_winner_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "bracket_matches", ["bracket_id"], name: "index_bracket_matches_on_bracket_id"
+ add_index "bracket_matches", ["match_id"], name: "index_bracket_matches_on_match_id"
+ add_index "bracket_matches", ["predicted_winner_id"], name: "index_bracket_matches_on_predicted_winner_id"
+
+ create_table "brackets", force: true do |t|
+ t.integer "user_id"
+ t.integer "tournament_id"
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "brackets", ["tournament_id"], name: "index_brackets_on_tournament_id"
+ add_index "brackets", ["user_id"], name: "index_brackets_on_user_id"
+
create_table "delayed_jobs", force: true do |t|
t.integer "priority", default: 0, null: false
t.integer "attempts", default: 0, null: false
diff --git a/test/controllers/brackets_controller_test.rb b/test/controllers/brackets_controller_test.rb
new file mode 100644
index 0000000..3f45a64
--- /dev/null
+++ b/test/controllers/brackets_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class BracketsControllerTest < ActionController::TestCase
+ setup do
+ @bracket = brackets(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:brackets)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create bracket" do
+ assert_difference('Bracket.count') do
+ post :create, bracket: { name: @bracket.name, tournament_id: @bracket.tournament_id, user_id: @bracket.user_id }
+ end
+
+ assert_redirected_to bracket_path(assigns(:bracket))
+ end
+
+ test "should show bracket" do
+ get :show, id: @bracket
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @bracket
+ assert_response :success
+ end
+
+ test "should update bracket" do
+ patch :update, id: @bracket, bracket: { name: @bracket.name, tournament_id: @bracket.tournament_id, user_id: @bracket.user_id }
+ assert_redirected_to bracket_path(assigns(:bracket))
+ end
+
+ test "should destroy bracket" do
+ assert_difference('Bracket.count', -1) do
+ delete :destroy, id: @bracket
+ end
+
+ assert_redirected_to brackets_path
+ end
+end
diff --git a/test/fixtures/bracket_matches.yml b/test/fixtures/bracket_matches.yml
new file mode 100644
index 0000000..a9a0c78
--- /dev/null
+++ b/test/fixtures/bracket_matches.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ bracket_id:
+ match_id:
+ predicted_winner_id:
+
+two:
+ bracket_id:
+ match_id:
+ predicted_winner_id:
diff --git a/test/fixtures/brackets.yml b/test/fixtures/brackets.yml
new file mode 100644
index 0000000..15b8207
--- /dev/null
+++ b/test/fixtures/brackets.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ user_id:
+ tournament_id:
+ name: MyString
+
+two:
+ user_id:
+ tournament_id:
+ name: MyString
diff --git a/test/helpers/brackets_helper_test.rb b/test/helpers/brackets_helper_test.rb
new file mode 100644
index 0000000..53da038
--- /dev/null
+++ b/test/helpers/brackets_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class BracketsHelperTest < ActionView::TestCase
+end
diff --git a/test/models/bracket_match_test.rb b/test/models/bracket_match_test.rb
new file mode 100644
index 0000000..f7c770c
--- /dev/null
+++ b/test/models/bracket_match_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class BracketMatchTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/bracket_test.rb b/test/models/bracket_test.rb
new file mode 100644
index 0000000..5faab05
--- /dev/null
+++ b/test/models/bracket_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class BracketTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end