Skip to content

Commit 70af089

Browse files
committed
Add integration test for #711
1 parent 0a058ba commit 70af089

File tree

5 files changed

+87
-0
lines changed

5 files changed

+87
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"license" : {
3+
"id" : "https://creativecommons.org/licenses/by/4.0/"
4+
},
5+
"license2" : {
6+
"id" : "https://creativecommons.org/licenses/by/4.0/"
7+
}
8+
}
9+
{
10+
"license" : {
11+
"id" : "https://creativecommons.org/licenses/by-sa/3.0/de/"
12+
},
13+
"license2" : {
14+
"id" : "https://creativecommons.org/licenses/by-sa/3.0/de/"
15+
}
16+
}
17+
{
18+
"license" : {
19+
"id" : "https://creativecommons.org/licenses/by-sa/4.0/"
20+
},
21+
"license2" : {
22+
"id" : "https://creativecommons.org/licenses/by-sa/4.0/"
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"data": [
3+
{
4+
"type": "Course",
5+
"id": "096c4cba-efe2-428a-968a-3eca66914256",
6+
"attributes": {
7+
"name": "IWB 4.0",
8+
"url": "https:\/\/lernen.oncampus.de\/weiterbildung\/moocs\/iwb-40",
9+
"license": [
10+
{
11+
"identifier": "CC BY 4.0",
12+
"url": "https:\/\/creativecommons.org\/licenses\/by\/4.0\/"
13+
}
14+
]
15+
}
16+
},
17+
{
18+
"type": "Course",
19+
"id": "f966208d-fabf-49f3-b545-52d81f6b2f1d",
20+
"attributes": {
21+
"name": "Volleyball-TrainerMOOC #2",
22+
"url": "https:\/\/lernen.oncampus.de\/weiterbildung\/moocs\/volleyball-trainer-mooc-2",
23+
"license": [
24+
{
25+
"identifier": "CC BY-SA 3.0 DE",
26+
"url": "https:\/\/creativecommons.org\/licenses\/by-sa\/3.0\/de\/"
27+
}
28+
]
29+
}
30+
},
31+
{
32+
"type": "Course",
33+
"id": "aa81ea14-233d-4982-8b03-f18c5c0c537a",
34+
"attributes": {
35+
"name": "Citizenship Education MOOC",
36+
"url": "https:\/\/lernen.oncampus.de\/mooc\/citizenedu",
37+
"license": [
38+
{
39+
"identifier": "CC BY-SA 4.0",
40+
"url": "https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"
41+
}
42+
]
43+
}
44+
}
45+
]
46+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ------ license ---
2+
copy_field("attributes.license[].*.url","license.id")
3+
copy_field("attributes.license[].*.id","license.id")
4+
5+
# ------ license2 ---
6+
copy_field("attributes.license[].*.url","license2.id")
7+
8+
retain("license","license2")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FLUX_DIR + "input.json"
2+
|open-file
3+
|as-records
4+
|decode-json
5+
|fix(FLUX_DIR + "test.fix")
6+
|encode-json(prettyPrinting="true")
7+
|write(FLUX_DIR + "output-metafix.json")
8+
;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See issue #711

0 commit comments

Comments
 (0)