Sha256: 79e09a0870054b2ed23b171813478ce6668fb3abb430025a8ef48a97e7a6aea2

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

require 'spec_helper'

module Tasuku
  describe Taskables::Code::Response do
    let(:request)  { create :code_request, code: '1337' }
    let(:user)     { create :user }

    describe 'validations' do
      context 'with an invalid code' do
        let(:response) { build :code_response, author: user, request: request, code: '0000' }

        it 'is not valid' do
          expect(response).not_to be_valid
        end
      end

      context 'with a valid code' do
        let(:response) { build :code_response, author: user, request: request, code: '1337' }

        it 'is valid' do
          expect(response).to be_valid
        end
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/models/tasuku/taskables/code/response_spec.rb
tasuku-1.0.1 spec/models/tasuku/taskables/code/response_spec.rb