ensl.org/spec/models/forum_spec.rb

34 lines
618 B
Ruby
Raw Normal View History

2015-08-20 14:48:19 +00:00
# == Schema Information
#
# Table name: forums
#
# id :integer not null, primary key
# description :string(255)
# position :integer
# title :string(255)
2015-08-20 14:48:19 +00:00
# created_at :datetime
# updated_at :datetime
# category_id :integer
#
# Indexes
#
# index_forums_on_category_id (category_id)
2015-08-20 14:48:19 +00:00
#
2019-10-17 18:29:15 +00:00
require "rails_helper"
2015-08-20 14:48:19 +00:00
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