Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wth - (SPARCRequest & SPARCDashboard) Additional Details 500 Error on #112

Merged
merged 1 commit into from Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/additional_details/previews_controller.rb
Expand Up @@ -19,6 +19,7 @@
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.~

class AdditionalDetails::PreviewsController < ApplicationController
before_action :authenticate_identity!

def create
@service = Service.find(params[:service_id])
Expand Down
Expand Up @@ -19,6 +19,7 @@
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.~

class AdditionalDetails::QuestionnairesController < ApplicationController
before_action :authenticate_identity!
before_action :find_service
before_action :find_questionnaire, only: [:edit, :update, :destroy]
layout 'additional_details'
Expand Down
@@ -1,4 +1,5 @@
class AdditionalDetails::SubmissionsController < ApplicationController
before_action :authenticate_identity!
layout 'additional_details'
include AdditionalDetails::StatesHelper

Expand Down
Expand Up @@ -19,6 +19,7 @@
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.~

class AdditionalDetails::UpdateQuestionnairesController < ApplicationController
before_action :authenticate_identity!

def update
@service = Service.find(params[:service_id])
Expand Down
Expand Up @@ -7,6 +7,9 @@
%h4.list-group-item-heading
= item.content
%p.list-group-item-text
= qr.content.delete('[]').delete('\"')
- if item.item_type == 'multiple_dropdown'
= qr.content.delete('[]').delete('\"')
- else
= qr.content
- unless item == @items.last
%hr
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::PreviewsController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#create' do
before :each do
@service = create( :service )
Expand Down Expand Up @@ -54,4 +57,4 @@

it { is_expected.to respond_with :ok }
end
end
end
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#destroy' do
before :each do
@service = create(:service)
Expand Down
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#edit' do
before :each do
@service = create(:service)
Expand Down
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#index' do
before :each do
@service = create(:service)
Expand Down
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#new' do
before :each do
@service = create(:service)
Expand All @@ -43,4 +46,4 @@

it { is_expected.to respond_with(:ok) }
end
end
end
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#create' do
before :each do
@service = create(:service)
Expand Down Expand Up @@ -119,4 +122,4 @@
it { is_expected.to respond_with(:ok) }
end
end
end
end
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::QuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#update' do
before :each do
@service = create(:service)
Expand Down
Expand Up @@ -21,6 +21,9 @@
require 'rails_helper'

RSpec.describe AdditionalDetails::UpdateQuestionnairesController do
stub_controller
let!(:logged_in_user) { create(:identity) }

describe '#update' do
before :each do
@service = create(:service)
Expand Down
Expand Up @@ -23,6 +23,7 @@
RSpec.describe 'User has multiple questionnaires that can be activated', js: true do

let_there_be_lane
fake_login_for_each_test

before(:each) do
@service = create(:service_with_ctrc_organization)
Expand Down
Expand Up @@ -22,6 +22,8 @@

RSpec.describe 'User creates an additional details questionnaire', js: true do
let_there_be_lane
fake_login_for_each_test

scenario 'successfully' do
service = create(:service, :with_ctrc_organization)
visit new_service_additional_details_questionnaire_path(service)
Expand Down
Expand Up @@ -2,6 +2,8 @@

RSpec.describe 'User should see error - no questions created', js: true do
let_there_be_lane
fake_login_for_each_test

scenario 'successfully' do
service = create(:service, :with_ctrc_organization)
visit new_service_additional_details_questionnaire_path(service)
Expand Down
Expand Up @@ -22,6 +22,8 @@

RSpec.describe 'User should see service questionnaire index', js: true do
let_there_be_lane
fake_login_for_each_test

scenario 'successfully' do
service = create(:service, :with_ctrc_organization)
questionnaire = create(:questionnaire,
Expand Down
@@ -1,6 +1,9 @@
require 'rails_helper'

RSpec.describe 'User should see validation errors on item content', js: true do
let_there_be_lane
fake_login_for_each_test

scenario 'successfully' do
service = create(:service, :with_ctrc_organization)
visit new_service_additional_details_questionnaire_path(service)
Expand Down