You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
require 'rails_helper'
|
|
|
|
describe ApiToken do
|
|
|
|
it { should validate_presence_of(:user) }
|
|
it { should validate_presence_of(:token) }
|
|
|
|
describe "uniqueness validation" do
|
|
before do
|
|
create(:api_token)
|
|
end
|
|
|
|
it { should validate_uniqueness_of(:token) }
|
|
end
|
|
|
|
end
|