-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routes path specs #135
Routes path specs #135
Changes from 4 commits
c32f77e
5e9591e
e930875
dd85f6d
deb15fb
12f5ccf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,4 +296,32 @@ | |
end | ||
end | ||
end | ||
|
||
context "when specs" do | ||
it "should show inbox spec" do | ||
expect(evaljs("Routes.inbox_path.toString()")).to eq('/inboxes/:id(.:format)') | ||
end | ||
|
||
it "should show inbox spec convert to string" do | ||
expect(evaljs("'' + Routes.inbox_path")).to eq('/inboxes/:id(.:format)') | ||
end | ||
|
||
it "should show inbox message spec" do | ||
expect(evaljs("Routes.inbox_message_path.toString()")).to eq('/inboxes/:inbox_id/messages/:id(.:format)') | ||
end | ||
|
||
it "should show inbox message spec convert to string" do | ||
expect(evaljs("'' + Routes.inbox_message_path")).to eq('/inboxes/:inbox_id/messages/:id(.:format)') | ||
end | ||
end | ||
|
||
context "when params" do | ||
it "should show inbox spec" do | ||
expect(evaljs("Routes.inbox_path.required_params").to_a).to eq(["id"]) | ||
end | ||
|
||
it "should show inbox message spec" do | ||
expect(evaljs("Routes.inbox_message_path.required_params").to_a).to eq(["inbox_id", "id"]) | ||
end | ||
end | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a test for function comment as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. Waiting travis :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are advanced things. Lets extract them to its own part of readme.
Don't want tricky features to be mixed with core.