2015-09-08 11:44:40 +02:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: clients
|
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# name :string not null
|
|
|
|
# key :string not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
#
|
|
|
|
|
2015-09-10 22:25:52 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Client, type: :model do
|
2015-09-08 14:26:04 +02:00
|
|
|
it "should have a valid factory" do
|
2015-09-10 22:25:52 +02:00
|
|
|
expect(create(:client)).to be_valid
|
2015-09-08 14:26:04 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should generate a key" do
|
2015-09-10 22:25:52 +02:00
|
|
|
expect(create(:client).key).to be_present
|
2015-09-08 14:26:04 +02:00
|
|
|
end
|
2015-09-08 11:30:11 +02:00
|
|
|
end
|