Skip to content

Commit

Permalink
Moves acadmic image to assets folder
Browse files Browse the repository at this point in the history
Some feature not active anymore, but some lab pages seem to try to load this image from academies template, but is not found by assets library.
  • Loading branch information
MacTwister committed Jan 13, 2024
1 parent 6cce9a1 commit c83b3ec
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
File renamed without changes
2 changes: 1 addition & 1 deletion app/models/academic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Academic < ActiveRecord::Base

belongs_to :user
belongs_to :lab
belongs_to :approver
belongs_to :approver, class_name: 'User'

validates_presence_of :started_in, :lab, :user

Expand Down
29 changes: 29 additions & 0 deletions spec/features/academics/listing_students_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require 'spec_helper'

feature "Showing students" do

given(:lab) { FactoryBot.create(:lab, workflow_state: 'approved') }
given(:user) { FactoryBot.create(:user, first_name: "Homer", last_name: "Simpson", workflow_state: "verified") }
given(:academic) { FactoryBot.create(:academic, user: user, lab: lab) }

scenario "as visitor" do
academic.approver = user
visit lab_url(lab)
expect(page).not_to have_content("Fab Academy Students")
end

scenario "as a academy user" do
admin = FactoryBot.create(:user)
admin.add_role :superadmin
admin.add_role :academy
admin.verify!
sign_in admin

academic.approver = admin
visit lab_url(lab)

expect(page).to have_content("Fab Academy Students")
expect(page).to have_content("Academy Website")
end

end

0 comments on commit c83b3ec

Please sign in to comment.