spec/lib/config_spec.rb in peertransfer_chat-0.2.1 vs spec/lib/config_spec.rb in peertransfer_chat-1.0.0
- old
+ new
@@ -1,18 +1,16 @@
require 'spec_helper'
describe PeertransferChat::Config do
- let(:team_name) { 'a team' }
- let(:team_token) { 'a token' }
+ let(:api_token) { 'a token' }
let(:team_channel) { 'a channel' }
let(:team_username) { 'a username' }
context 'when configured' do
before do
PeertransferChat.configure do |config|
- config.team = team_name
- config.incoming_token = team_token
+ config.api_token = api_token
config.channel = team_channel
config.username = team_username
end
end
@@ -25,18 +23,17 @@
end.to raise_error('configuration is wrong')
end
end
it 'stores config' do
- expect(PeertransferChat.config.team).to eq('a team')
+ expect(PeertransferChat.config.api_token).to eq(api_token)
end
end
context 'not configured' do
before do
PeertransferChat.configure do |config|
- config.team = team_name
- config.incoming_token = team_token
+ config.api_token = api_token
config.channel = team_channel
end
end
it 'raises an exception if all values are not set' do