Skip to content

Commit

Permalink
Revert code as changes were made to eslint gem
Browse files Browse the repository at this point in the history
Moved changes to eslint/eslint#11683
  • Loading branch information
hspazio committed May 17, 2019
1 parent 0f10e88 commit 8dd40cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion lib/gitlab/ci/reports/test_case.rb
Expand Up @@ -14,7 +14,7 @@ class TestCase

def initialize(name:, classname:, execution_time:, status:, file: nil, system_output: nil, stack_trace: nil)
@name = name
@classname = classname.present? ? classname : file
@classname = classname
@file = file
@execution_time = execution_time.to_f
@status = status
Expand Down
24 changes: 0 additions & 24 deletions spec/lib/gitlab/ci/parsers/test/junit_spec.rb
Expand Up @@ -116,30 +116,6 @@
end
end

context 'when there are two test cases without classname' do
let(:junit) do
<<-EOF.strip_heredoc
<testsuite>
<testcase name='sumTest1' time='0.01' file='./path/to/file1'></testcase>
<testcase name='sumTest2' time='0.02' file='./path/to/file2'></testcase>
</testsuite>
EOF
end

it 'parses XML and adds test cases to a suite defaulting classname to file attribute' do
expect { subject }.not_to raise_error

expect(test_cases[0].classname).to eq('./path/to/file1')
expect(test_cases[0].file).to eq('./path/to/file1')
expect(test_cases[0].name).to eq('sumTest1')
expect(test_cases[0].execution_time).to eq(0.01)
expect(test_cases[1].classname).to eq('./path/to/file2')
expect(test_cases[1].file).to eq('./path/to/file2')
expect(test_cases[1].name).to eq('sumTest2')
expect(test_cases[1].execution_time).to eq(0.02)
end
end

context 'when there are two test suites' do
let(:junit) do
<<-EOF.strip_heredoc
Expand Down

0 comments on commit 8dd40cf

Please sign in to comment.