Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Drush command to create campaigns from JSON#2835

Merged
aaronschachter merged 5 commits intoDoSomethingArchive:devfrom
aaronschachter:json_node
Jul 17, 2014
Merged

Drush command to create campaigns from JSON#2835
aaronschachter merged 5 commits intoDoSomethingArchive:devfrom
aaronschachter:json_node

Conversation

@aaronschachter
Copy link
Contributor

Fixes #2793

@sergii-tkachenko Would you mind reviewing?

cc @DFurnes

Adds a drush command drush campaign-create to create a campaign node from a given JSON file, and adds said JSON file into the tests/campaign directory.

vagrant@dev:/var/www/vagrant/html$ drush campaign-create ../tests/campaign/campaign.json
Created node nid 1292.

The function and JSON files are minimal at the moment, just to get this up and running. The idea here is that the Capser JS tests will read from the JSON file as well when checking for the presence of various fields, so we're not relying on content within the database as is, and hardcoding tests based on that content.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd better name it campaign-create, following pattern user-create, pantheon-site-create, etc

aaronschachter added a commit that referenced this pull request Jul 17, 2014
Drush command to create campaigns from JSON
@aaronschachter aaronschachter merged commit f3315e9 into DoSomethingArchive:dev Jul 17, 2014
@aaronschachter aaronschachter deleted the json_node branch July 17, 2014 12:00
@sergiitk
Copy link
Contributor

👍 Awesome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Testing: Create a campaign node from json file

2 participants