VRFS-2094 fix tests
This commit is contained in:
parent
850709e51a
commit
d547e4c2d6
|
|
@ -22,10 +22,11 @@ describe MusicNotation do
|
|||
|
||||
notation = MusicNotation.new
|
||||
notation.file_url = File.open(NOTATION_TEMP_FILE)
|
||||
notation.size = File.size(NOTATION_TEMP_FILE)
|
||||
notation.user = FactoryGirl.create(:user)
|
||||
notation.save!
|
||||
|
||||
File.basename(notation.file_url.path).should == NOTATION_TEMP_FILE
|
||||
File.basename(notation.file_url.path).should == notation.user.id
|
||||
notation.size.should == File.size(NOTATION_TEMP_FILE)
|
||||
|
||||
stub_const("APP_CONFIG", app_config)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ describe UnusedMusicNotationCleaner do
|
|||
it "find no music notataions if music_session_id is nil and created at 1 hour ago" do
|
||||
notation = MusicNotation.new
|
||||
notation.file_url = File.open(NOTATION_TEMP_FILE)
|
||||
notation.size = 10
|
||||
notation.user = FactoryGirl.create(:user)
|
||||
notation.created_at = Time.now - 1.hours
|
||||
notation.save!
|
||||
|
|
@ -44,6 +45,7 @@ describe UnusedMusicNotationCleaner do
|
|||
|
||||
notation = MusicNotation.new
|
||||
notation.file_url = File.open(NOTATION_TEMP_FILE)
|
||||
notation.size = 10
|
||||
notation.user = FactoryGirl.create(:user)
|
||||
notation.created_at = Time.now - 1.hours
|
||||
notation.music_session = music_session
|
||||
|
|
@ -55,6 +57,7 @@ describe UnusedMusicNotationCleaner do
|
|||
it "find music notataions if music_session_id is nil and created at 2 days ago" do
|
||||
notation = MusicNotation.new
|
||||
notation.file_url = File.open(NOTATION_TEMP_FILE)
|
||||
notation.size = 10
|
||||
notation.user = FactoryGirl.create(:user)
|
||||
notation.created_at = Time.now - 2.days
|
||||
notation.save!
|
||||
|
|
@ -68,6 +71,7 @@ describe UnusedMusicNotationCleaner do
|
|||
|
||||
notation = MusicNotation.new
|
||||
notation.file_url = File.open(NOTATION_TEMP_FILE)
|
||||
notation.size = 10
|
||||
notation.user = FactoryGirl.create(:user)
|
||||
notation.created_at = Time.now - 3.days
|
||||
notation.music_session = music_session
|
||||
|
|
|
|||
Loading…
Reference in New Issue