Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-22 15:33:36 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-22 15:33:36 +0300
commitb92ce0ccb68d1dd39a1dd06f4a57979db7299526 (patch)
treec909f69a5b9f3d9d03d9fe1b07e639bf17ad5c8a /spec/lib/gitlab/ci/pipeline/expression
parentd532a9cb2fb7d1ff4c1369ec06701edb536d39c1 (diff)
Rename pipeline expressions statement exception class
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/expression')
-rw-r--r--spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
index f7695a28ea6..641398d539a 100644
--- a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
@@ -25,10 +25,21 @@ describe Gitlab::Ci::Pipeline::Expression::Statement do
end
describe '#parse_tree' do
+ context 'when expression is empty' do
+ let(:text) { '' }
+
+ it 'raises an error' do
+ expect { subject.parse_tree }
+ .to raise_error described_class::StatementError
+ end
+ end
+
context 'when expression grammar is incorrect' do
+ let(:text) { '$VAR "text"' }
+
it 'raises an error' do
expect { subject.parse_tree }
- .to raise_error described_class::ParserError
+ .to raise_error described_class::StatementError
end
end