Skip to content

Commit

Permalink
add GameNight validations, fix user factory
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Dec 13, 2015
1 parent b5cceac commit 97c92f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/models/game_night.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
class GameNight < ActiveRecord::Base
validates :time, presence: true
validates :location_name, presence: true
end
1 change: 1 addition & 0 deletions spec/factories/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
city Faker::Address.city
state Faker::Address.state
country Faker::Address.country
password "helloworld"
email_confirmed true
end

Expand Down
4 changes: 2 additions & 2 deletions spec/models/game_night_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
end

describe "associations" do
let(:user1) { create(:user) }
let(:user2) { create(:user) }
let(:user1) { create(:confirmed_user) }
let(:user2) { create(:confirmed_user) }
let(:group) { create(:group) }
let(:game_night) { create(:game_night, group_id: group.id) }

Expand Down

0 comments on commit 97c92f8

Please sign in to comment.