added tests

This commit is contained in:
Hauke Klement
2015-02-10 15:36:03 +01:00
parent 59ca0a57c3
commit 6fbeb574e3
3 changed files with 79 additions and 29 deletions

View File

@ -0,0 +1,15 @@
require 'rails_helper'
describe ExerciseHelper do
describe '#embedding_parameters' do
let(:exercise) { FactoryGirl.build(:dummy) }
it 'contains the locale' do
expect(embedding_parameters(exercise)).to start_with("locale=#{I18n.locale}")
end
it 'contains the token' do
expect(embedding_parameters(exercise)).to end_with("token=#{exercise.token}")
end
end
end