Set a random token after model initialization http://shorts.jeffkreeftmeijer.com/2014/set-a-random-token-after-model-initialization/
require_relative '../../test_helper' | |
describe Concerns::Token do | |
[Session, Discussion, Comment, Notification].each do |model| | |
describe "for a #{model}" do | |
it "automatically generates a token" do | |
model.new.token.length.should == 32 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment