fix test regex
This commit is contained in:
parent
3fbb3d1dc9
commit
f3eb558971
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ RSpec.describe Token, type: :model do
|
|||
context "#generate_token" do
|
||||
subject (:token) { Token.new }
|
||||
it "should generate an alphanumeric token of 32 characters" do
|
||||
expect(token.send(:generate_token)).to match /[a-zA-Z0-9]{32}/
|
||||
expect(token.send(:generate_token)).to match /^[a-zA-Z0-9]{32}$/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue