datapipeline 2.0.0: Gem aus dem Projekt etl herausgelöst
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
require_relative '../test_helper'
|
||||
|
||||
# no network: only construction and options
|
||||
class SlackTest < PipelineTest
|
||||
def test_token_required
|
||||
token = ENV.delete('SLACK_TOKEN')
|
||||
assert_raises(ArgumentError) { DataPipeline::Slack.new }
|
||||
ensure
|
||||
ENV['SLACK_TOKEN'] = token if token
|
||||
end
|
||||
|
||||
def test_options_per_instance
|
||||
a = DataPipeline::Slack.new(token: 'x', channel: '#a')
|
||||
b = DataPipeline::Slack.new(token: 'y')
|
||||
assert_equal '#a', a.instance_variable_get(:@options)[:channel]
|
||||
assert_equal '#general', b.instance_variable_get(:@options)[:channel]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user