serializations_controller_spec.rb revision db149239590d2a39d399f12cd01609b190ea4763
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksarequire 'spec_helper'
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:language) { create :language, user: user }
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa let!(:serial) { 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')
db149239590d2a39d399f12cd01609b190ea4763Eugen 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')
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa expect(Serialization.find_by_id(serial.id)).to be(nil)
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa before { get :show, id: serial.id, language_id: language.id }
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa expect(Serialization.find_by_name('test2')).to be(nil)
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa expect(Serialization.find_by_name('test2')).to be(nil)