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.
asciinema.org/spec/models/api_token_spec.rb

17 lines
282 B
Ruby

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