Skip to content

Commit

Permalink
simlify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cernicc committed Nov 20, 2024
1 parent 7533157 commit 8678ece
Show file tree
Hide file tree
Showing 16 changed files with 258 additions and 433 deletions.
12 changes: 6 additions & 6 deletions pallets/market/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ fn activate_deals() {
let deals = bounded_vec![
SectorDealBuilder::default().build(),
SectorDealBuilder::default()
.sector_number(2)
.sector_number(2.into())
.sector_expiry(50)
.deal_ids(bounded_vec![])
.build()
Expand Down Expand Up @@ -849,16 +849,16 @@ fn activate_deals_fails_for_1_sector_but_succeeds_for_others() {
let deals = bounded_vec![
SectorDealBuilder::default().build(),
SectorDealBuilder::default()
.sector_number(2)
.sector_number(2.into())
.sector_expiry(50)
.deal_ids(bounded_vec![])
.build(),
SectorDealBuilder::default()
.sector_number(3)
.sector_number(3.into())
.deal_ids(bounded_vec![1337])
.build(),
SectorDealBuilder::default()
.sector_number(4)
.sector_number(4.into())
// force error by making expiry < start_block
.sector_expiry(10)
.deal_ids(bounded_vec![2])
Expand Down Expand Up @@ -1723,8 +1723,8 @@ impl SectorDealBuilder {
self
}

pub fn sector_number(mut self, sector_number: u32) -> Self {
self.sector_number = sector_number.into();
pub fn sector_number(mut self, sector_number: SectorNumber) -> Self {
self.sector_number = sector_number;
self
}

Expand Down
Loading

0 comments on commit 8678ece

Please sign in to comment.