From 510f16768066c02587fa4a6e960fbef5fc8d8085 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sun, 26 Apr 2015 13:55:15 +0000 Subject: [PATCH] Test for Asciicast.generate_secret_token --- spec/models/asciicast_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/models/asciicast_spec.rb b/spec/models/asciicast_spec.rb index 6843614..a823fb1 100644 --- a/spec/models/asciicast_spec.rb +++ b/spec/models/asciicast_spec.rb @@ -41,6 +41,12 @@ describe Asciicast do end end + describe '.generate_secret_token' do + subject { Asciicast.generate_secret_token } + + it { should match(/^[a-z0-9]{25}$/) } + end + describe '.for_category_ordered' do subject { described_class.for_category_ordered(category, order) }