ensl.org/spec/models/forum_spec.rb
Ari Timonen e59e8ac8e7 Lots of rails 4 updates
- Add .params to models and update controllers
- Add afk time to gather
- Reannotate models
- Fix rspec problem by using latest rspec plugins from github
2020-03-18 05:38:17 +02:00

33 lines
618 B
Ruby

# == Schema Information
#
# Table name: forums
#
# id :integer not null, primary key
# description :string(255)
# position :integer
# title :string(255)
# created_at :datetime
# updated_at :datetime
# category_id :integer
#
# Indexes
#
# index_forums_on_category_id (category_id)
#
require "rails_helper"
describe Forum do
let!(:user) { create :user }
describe "create" do
let(:forum) { build :forum }
it "creates a new forum" do
expect(forum.valid?).to eq(true)
expect do
forum.save!
end.to change(Forum, :count).by(1)
end
end
end