4bcb45d0bb
poll id was not set as part of url afterwards; add tests to not let this happen again
10 lines
326 B
JavaScript
10 lines
326 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Test.registerHelper('pollHasValidURL', function(app, assert) {
|
|
const pollURL = currentURL();
|
|
const regExp = /^\/poll\/[a-zA-Z0-9]{10}\/participation\?encryptionKey=[a-zA-Z0-9]{40}$/;
|
|
assert.ok(
|
|
regExp.test(pollURL),
|
|
`poll URL ${currentURL()} looks fine`
|
|
);
|
|
});
|