1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/spec/requests/passports/show_spec.rb

66 lines
1.4 KiB
Ruby
Raw Normal View History

2018-11-29 21:34:46 -05:00
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'GET /passports/:id' do
before do
get "/passports/#{passport.id}"
end
2018-12-02 11:44:02 -05:00
context 'when passport is empty' do
let!(:passport) { create :empty_passport }
specify do
expect(response).to have_http_status :ok
end
end
context 'when passport has a passport map' do
let!(:passport) { create :passport_with_passport_map }
specify do
expect(response).to have_http_status :ok
end
2018-11-29 21:34:46 -05:00
end
2018-12-01 04:59:41 -05:00
context 'when passport has an image' do
let!(:passport) { create :passport_with_image }
specify do
expect(response).to have_http_status :ok
end
end
2018-12-02 11:44:02 -05:00
context 'when passport has a passport map and an image' do
let!(:passport) { create :passport_with_passport_map_and_image }
specify do
expect(response).to have_http_status :ok
end
end
context 'when passport has almost enough confirmations' do
let!(:passport) { create :passport_with_almost_enough_confirmations }
specify do
expect(response).to have_http_status :ok
end
end
context 'when passport has enough confirmations' do
let!(:passport) { create :passport_with_enough_confirmations }
specify do
expect(response).to have_http_status :ok
end
end
2018-12-01 04:59:41 -05:00
context 'when passport is confirmed' do
let!(:passport) { create :confirmed_passport }
specify do
expect(response).to have_http_status :ok
end
end
2018-11-29 21:34:46 -05:00
end