Skip to content

test: add integration tests for Ownable plugin#59

Merged
mooori merged 2 commits into
near:masterfrom
mooori:ownable-itest
Jan 10, 2023
Merged

test: add integration tests for Ownable plugin#59
mooori merged 2 commits into
near:masterfrom
mooori:ownable-itest

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Jan 10, 2023

Adds integration tests for Ownable and removes the corresponding unit tests. The background and motivation are described in #51, which does the same for Pausable.

@mooori mooori marked this pull request as ready for review January 10, 2023 15:14
@mooori mooori requested a review from birchmd January 10, 2023 15:14
/// it.
///
/// It is possible to use `#[only(self)]` even if the contract does not derive `Ownable`.
#[only(self)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is only(self) equivilent to private from near-sdk?

Copy link
Copy Markdown
Contributor Author

@mooori mooori Jan 10, 2023

Choose a reason for hiding this comment

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

True, they are equivalent. I think we should mention that in the docs and recommend using #[private] rather than #[only(self)], since the latter is provided by near-sdk directly. Would that make sense?

I’ve merged this PR since it’s intended to be a port of unit to integration tests. In a follow-up PR I can handle the self docs, if necessary.

@mooori mooori merged commit 4847173 into near:master Jan 10, 2023
@mooori mooori deleted the ownable-itest branch January 10, 2023 17:54
This was referenced Mar 27, 2026
This was referenced Apr 7, 2026
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.

3 participants