This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/spec/models/one_time_key_spec.rb

24 lines
531 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2020-06-02 10:24:53 -07:00
require 'rails_helper'
describe OneTimeKey do
describe 'validations' do
context 'with an invalid signature' do
let(:one_time_key) { Fabricate.build(:one_time_key, signature: 'wrong!') }
it 'is invalid' do
expect(one_time_key).to_not be_valid
end
end
context 'with an invalid key' do
let(:one_time_key) { Fabricate.build(:one_time_key, key: 'wrong!') }
it 'is invalid' do
expect(one_time_key).to_not be_valid
end
end
end
2020-06-02 10:24:53 -07:00
end