@@ -7,6 +7,7 @@ use crate::c_oracle_header::{
77 PC_VERSION ,
88} ;
99use crate :: deserialize:: load_account_as;
10+ use crate :: error:: OracleError ;
1011use crate :: rust_oracle:: {
1112 clear_account,
1213 init_mapping,
@@ -57,7 +58,7 @@ fn test_init_mapping() {
5758 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
5859 instruction_data
5960 ) ,
60- Err ( ProgramError :: InvalidArgument )
61+ Err ( OracleError :: InvalidFreshAccount . into ( ) )
6162 ) ;
6263
6364 clear_account ( & mapping_account) . unwrap ( ) ;
@@ -75,7 +76,7 @@ fn test_init_mapping() {
7576 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
7677 instruction_data
7778 ) ,
78- Err ( ProgramError :: InvalidArgument )
79+ Err ( OracleError :: InvalidFundingAccount . into ( ) )
7980 ) ;
8081
8182 funding_account. is_signer = true ;
@@ -87,7 +88,7 @@ fn test_init_mapping() {
8788 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
8889 instruction_data
8990 ) ,
90- Err ( ProgramError :: InvalidArgument )
91+ Err ( OracleError :: InvalidSignableAccount . into ( ) )
9192 ) ;
9293
9394 mapping_account. is_signer = true ;
@@ -99,7 +100,7 @@ fn test_init_mapping() {
99100 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
100101 instruction_data
101102 ) ,
102- Err ( ProgramError :: InvalidArgument )
103+ Err ( OracleError :: InvalidFundingAccount . into ( ) )
103104 ) ;
104105
105106 funding_account. is_writable = true ;
@@ -111,7 +112,7 @@ fn test_init_mapping() {
111112 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
112113 instruction_data
113114 ) ,
114- Err ( ProgramError :: InvalidArgument )
115+ Err ( OracleError :: InvalidSignableAccount . into ( ) )
115116 ) ;
116117
117118 mapping_account. is_writable = true ;
@@ -123,7 +124,7 @@ fn test_init_mapping() {
123124 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
124125 instruction_data
125126 ) ,
126- Err ( ProgramError :: InvalidArgument )
127+ Err ( OracleError :: InvalidSignableAccount . into ( ) )
127128 ) ;
128129
129130 mapping_account. owner = & program_id;
@@ -136,7 +137,7 @@ fn test_init_mapping() {
136137 & [ funding_account. clone( ) , mapping_account. clone( ) ] ,
137138 instruction_data
138139 ) ,
139- Err ( ProgramError :: InvalidArgument )
140+ Err ( OracleError :: InvalidSignableAccount . into ( ) )
140141 ) ;
141142
142143 mapping_account. data = prev_data;
0 commit comments