serializations_controller_spec.rb revision 23305f217b86a2ebf90a848af9036908e0070542
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksarequire 'spec_helper'
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:language) { FactoryGirl.create :language, user: user }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:serial) { FactoryGirl.create :serialization, language: language }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:serial_from_db) { Serialization.find_by_name('test132') }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:serial_from_db) { Serialization.find_by_name('test4325') }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(serial_from_db.mimetype).to eq('texttext')
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(Serialization.find_by_id(serial.id)).to be_nil
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:serial_from_db) { Serialization.find_by_name('test132') }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa let!(:serial_from_db) { Serialization.find_by_name('test4325') }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(serial_from_db.mimetype).to eq('texttext')
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(Serialization.find_by_id(serial.id)).to be_nil
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa before { get :show, id: serial.id, language_id: language.id }
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(Serialization.find_by_name('test2')).to be_nil
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa expect(Serialization.find_by_name('test2')).to be_nil