Sha256: bf7e57fa4fe8e8d8e898498bf5dc860954b7661085b318e72c26023f5a929af7
Contents?: true
Size: 962 Bytes
Versions: 25
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' describe Lifen::Message do let(:valid_token_value) { "valide_token" } # let(:valid_token_value) { "REPLACE_ME" } let(:valid_token) { Lifen::Token.new(value: valid_token_value, expires_at: Time.now.to_i + 60) } let(:user) { Lifen::User.new(token: valid_token) } let(:flow) { Lifen::Flow.new(user: user, uuid: "11e6be18-7a35-d759-9177-0242ac110002") } let(:message) { Lifen::Message.new(flow: flow, content: "Bonjour Lifen") } describe "create" do context "valid message" do it 'has valid attributes' do VCR.use_cassette "messages/valid_message" do message.create end expect(message.uuid).to eq("11e6be20-5647-8f9b-9177-0242ac110002") expect(message.type).to eq("regular") expect(message.flow).to eq(flow) expect(message.sent_at.to_date).to eq Date.new(2016, 12, 9) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems