feat: Add Alpine to assets
This commit is contained in:
parent
d562855024
commit
be58824bd3
4 changed files with 17 additions and 1 deletions
|
@ -13,6 +13,7 @@ import "../css/app.css"
|
|||
// import socket from "./socket"
|
||||
//
|
||||
import "phoenix_html"
|
||||
import "alpinejs"
|
||||
import { ready } from "./utils"
|
||||
|
||||
function togglePasswordFieldVisibility()
|
||||
|
|
5
apps/app/assets/package-lock.json
generated
5
apps/app/assets/package-lock.json
generated
|
@ -1332,6 +1332,11 @@
|
|||
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
|
||||
"dev": true
|
||||
},
|
||||
"alpinejs": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-2.8.1.tgz",
|
||||
"integrity": "sha512-ETJ/k0fbiBeP+OSd5Fhj70c+zb+YRzcVbyh5DVeLT3FBWMUeUvjOSWLi53IVLPSehaT2SKmB7w08WGF2jYTqNA=="
|
||||
},
|
||||
"amdefine": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.14.0",
|
||||
"alpinejs": "^2.8.1",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"csswring": "^7.0.0",
|
||||
"glob": "^7.1.6",
|
||||
|
|
|
@ -27,4 +27,13 @@ defmodule AuthWeb.Plugs.RequireAdminTest do
|
|||
|
||||
assert !conn.halted
|
||||
end
|
||||
|
||||
test "call/2 with a user who is not admin", %{conn: conn} do
|
||||
conn =
|
||||
conn
|
||||
|> Pow.Plug.assign_current_user(%User{roles: []}, [])
|
||||
|> RequireAdmin.call([])
|
||||
|
||||
assert conn.halted
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue