-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f5c3e0
commit d2d28fc
Showing
10 changed files
with
45 additions
and
22 deletions.
There are no files selected for viewing
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,7 @@ | ||
files: | ||
"/etc/nginx/conf.d/proxy.conf" : | ||
mode: "000755" | ||
owner: root | ||
group: root | ||
content: | | ||
client_max_body_size 20M; |
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 @@ | ||
nicholas@172-18-196-0.DYNAPOOL.NYU.EDU.84123 |
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
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 |
---|---|---|
|
@@ -44,16 +44,9 @@ | |
# :address => "localhost", :port => 1025 | ||
# } | ||
|
||
config.action_mailer.default_url_options = { :host => 'api.stuyspec.com'} | ||
config.action_mailer.delivery_method = :smtp | ||
config.action_mailer.smtp_settings = { | ||
:address => "smtp.gmail.com", | ||
:port => 587, | ||
:user_name => '[email protected]', | ||
:password => ENV['EMAIL_PASSWORD'], | ||
:authentication => 'plain', | ||
:enable_starttls_auto => true | ||
} | ||
config.action_mailer.default_url_options = { :host => 'api.stuyspec.com'} | ||
config.action_mailer.delivery_method = :smtp | ||
config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025} | ||
|
||
config.paperclip_defaults = { | ||
:storage => :s3, | ||
|
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 @@ | ||
nicholas@172-18-196-0.DYNAPOOL.NYU.EDU.84123 |
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "Articles", type: :request do | ||
before(:all) do | ||
@user = User.find_or_create_by( | ||
email: "[email protected]", | ||
) | ||
end | ||
describe "GET /articles" do | ||
it "returns correct types" do | ||
get articles_path | ||
get articles_path, params: { limit: 10 } | ||
expect_json_types( | ||
'*', | ||
'?', | ||
title: :string, | ||
slug: :string, | ||
content: :string | ||
|
@@ -15,7 +20,8 @@ | |
|
||
describe "POST /articles" do | ||
it "creates new article" do | ||
post articles_path, | ||
auth_token = @user.create_new_auth_token | ||
post(articles_path, | ||
params: { | ||
article: { | ||
title: 'My article', | ||
|
@@ -25,12 +31,15 @@ | |
is_published: false, | ||
}, | ||
section_id: 1 | ||
} | ||
}, | ||
headers: auth_token | ||
) | ||
end | ||
end | ||
|
||
describe "PUT /articles" do | ||
it "updates article" do | ||
auth_token = @user.create_new_auth_token | ||
article = Article.first | ||
put article_path(article), | ||
params: { | ||
|
@@ -41,14 +50,16 @@ | |
issue: 2, | ||
is_published: false, | ||
} | ||
} | ||
}, | ||
headers: auth_token | ||
end | ||
end | ||
|
||
describe "DELETE /articles" do | ||
it "deletes article" do | ||
auth_token = @user.create_new_auth_token | ||
article = Article.first | ||
delete article_path(article) | ||
delete article_path(article), headers: auth_token | ||
end | ||
end | ||
end |
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
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