-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves acadmic image to assets folder
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
1 parent
6cce9a1
commit c83b3ec
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |