Skip to content
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

Ferigis.66.add from ctx #67

Merged
merged 4 commits into from
Feb 24, 2017
Merged

Ferigis.66.add from ctx #67

merged 4 commits into from
Feb 24, 2017

Conversation

ferigis
Copy link
Member

@ferigis ferigis commented Feb 24, 2017

[close #66]

value = sr_state:retrieve(key, SrState2, not_found),
SrState3 = sr_state:remove(key, SrState2),
not_found = sr_state:retrieve(key, SrState3, not_found),
CowboyReq = fake_cowboy_req(),
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the functions in sr_request in a super-dumb echo handler/module with the following function?

from_ctx(#{req := Req}) ->
  #{headers => sr_request:headers(Req),
    path => sr_request:path(Req),
    bindings => sr_request:bindings(Req)
  }.

My goal is to test these new features by actually using them, not just for coverage completeness

, #{agent => <<"a1">>}),
[_] = meck:unload(),

ct:comment("Functions coverage"),
Copy link
Member

Choose a reason for hiding this comment

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

Make it clear that what you're actually testing is sr_state:remove here.

@cabol cabol merged commit 207cce1 into master Feb 24, 2017
@elbrujohalcon elbrujohalcon deleted the ferigis.66.add_from_ctx branch May 15, 2018 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add sumo_rest_doc:from_ctx/1 callback
3 participants