Skip to content

Commit

Permalink
Fix two failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Sep 19, 2017
1 parent dd833c0 commit 6e28409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_plugin/shortage.rb
Expand Up @@ -196,7 +196,7 @@ def test_export_csv
assert(File.exist?(@plugin.csv_file_path))
assert_equal(@plugin.yesterday_csv_file_path, @csv_file.sub('.csv', '-2014.04.30.csv'))
assert_equal(@plugin.dated_csv_file_path, @csv_file.sub('.csv', '-2014.05.01.csv'))
assert(File.exist?(@plugin.dated_csv_file_path))
assert(File.exist?(@plugin.dated_csv_file_path)) unless `which ssconvert`.chomp.empty?
end
def test_date
@plugin.update(@agent)
Expand Down
3 changes: 2 additions & 1 deletion test/test_state/admin/sequence.rb
Expand Up @@ -55,9 +55,10 @@ def test_get_patinfo_input__html_upload_nil_model_patinfo
assert_equal(@sequence, @sequence.get_patinfo_input({}))
end
def test_get_patinfo_input__patinfo_upload
pi_file = flexmock('pi_file', :[] => {})
flexmock(@session) do |s|
s.should_receive(:user_input).once.with(:html_upload)
s.should_receive(:user_input).once.with(:patinfo_upload).and_return('pi_file')
s.should_receive(:user_input).at_least.once.with(:patinfo_upload).and_return(pi_file)
end
pointer = flexmock('pointer') do |p|
p.should_receive(:skeleton).and_return([:company]) # This is the key point
Expand Down

0 comments on commit 6e28409

Please sign in to comment.