mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
e59e8ac8e7
- Add .params to models and update controllers - Add afk time to gather - Reannotate models - Fix rspec problem by using latest rspec plugins from github
33 lines
618 B
Ruby
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
|