Add spec for editing channels

This commit is contained in:
David Taylor 2017-07-29 19:29:19 +01:00
parent 28091a9a97
commit 5bf1b4a653
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,12 @@ RSpec.describe DiscourseChat::Channel do
end
it 'should edit successfully' do
channel = DiscourseChat::Channel.create!(provider:"dummy2", data:{val:"hello"})
expect(channel.valid?).to eq(true)
channel.save!
end
it 'can be filtered by provider' do
channel1 = DiscourseChat::Channel.create!(provider:'dummy')
channel2 = DiscourseChat::Channel.create!(provider:'dummy2', data:{val:"blah"})