mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-14 17:04:38 +00:00
Cleanup
This commit is contained in:
parent
bd0cde685b
commit
afe2c74bba
@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ENV_FILE=$(dirname "$0")/.env
|
||||
[[ -f "$ENV_FILE" ]] && source "$ENV_FILE"
|
||||
|
||||
if [ -z "$NEO4J_USERNAME" ] || [ -z "$NEO4J_PASSWORD" ]; then
|
||||
echo "Please set NEO4J_USERNAME and NEO4J_PASSWORD environment variables."
|
||||
echo "Database manipulation is not possible without connecting to the database."
|
||||
echo "E.g. you could \`cp .env.template .env\` unless you run the script in a docker container"
|
||||
fi
|
||||
|
||||
until echo 'RETURN "Connection successful" as info;' | cypher-shell
|
||||
do
|
||||
echo "Connecting to neo4j failed, trying again..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "
|
||||
:begin
|
||||
MATCH (submitter:User)-[filed:FILED]->(report:Report)
|
||||
WHERE NOT (submitter)<-[:NOTIFIED]-(report)
|
||||
CREATE (submitter)<-[notification:NOTIFIED]-(report)
|
||||
SET notification.createdAt = filed.createdAt,
|
||||
notification.updatedAt = notification.createdAt,
|
||||
notification.read = FALSE,
|
||||
notification.reason = 'filed_report_on_resource';
|
||||
:commit
|
||||
" | cypher-shell
|
||||
@ -74,12 +74,12 @@ describe('NotificationList.vue', () => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
describe("emit 'read', like as clicked on a notification", () => {
|
||||
describe("emit 'read' like as clicked on a notification", () => {
|
||||
beforeEach(() => {
|
||||
wrapper.find(Notification).vm.$emit('read')
|
||||
})
|
||||
|
||||
it("emits 'markAsRead' with the id of the notification source, if 'read' was emited", () => {
|
||||
it("emits 'markAsRead' with the id of the notification source if 'read' was emited", () => {
|
||||
expect(wrapper.emitted('markAsRead')[0]).toEqual(['post-1'])
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user